# [Jelly], 9 bytes Œp§’÷_ɗ2P [Try it online!][TIO-k352nqes] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-k352nqes]: https://tio.run/##y0rNyan8///opIJDyx81zDy8Pf7kdKOA/4fbHzWtifz/P9pQBwhjdcC0EZg20jEG0kASLA6iTYA0kATLGwP5prEA "Jelly – Try It Online" Based on the closed form expression given in the question.