OFFSET
1,1
LINKS
Jwalin Bhatt, Table of n, a(n) for n = 1..273
Simon Plouffe, Identities inspired by Ramanujan Notebooks (part 2), April 2006.
Linas Vepštas, On Plouffe's Ramanujan identities, The Ramanujan Journal, Vol. 27 (2012), pp. 387-408; arXiv preprint, arXiv:math/0609775 [math.NT], 2006-2010.
Eric Weisstein's World of Mathematics, Riemann Zeta Function.
FORMULA
a(n) = A057866((n+1)/2) for odd n.
a(n) = A395447(n/2) for even n. - Jwalin Bhatt, May 12 2026
MATHEMATICA
a[n_] := Module[{n0 = n, s, s1, s2, frac},
If[OddQ[n], (* 4n - 1 case *)
n0 = Floor[n/2] + 1;
s = Sum[
(-1)^j * Binomial[4*n0, 2*j] * BernoulliB[4*n0 - 2*j] * BernoulliB[2*j],
{j, 0, 2*n0}
];
frac = -2^(4*n0 - 2) * s / Factorial[4*n0];
,
(* 4n + 1 case *)
n0 = Floor[n/2];
s1 = Sum[
(-4)^(n0 + j) * Binomial[4*n0 + 2, 4*j] * BernoulliB[4*n0 - 4*j + 2] * BernoulliB[4*j],
{j, 0, n0}
];
s2 = Sum[
(-4)^j * Binomial[4*n0 + 2, 2*j] * BernoulliB[4*n0 - 2*j + 2] * BernoulliB[2*j],
{j, 0, 2*n0 + 1}
];
frac = 2^(4*n0 + 1) * (s1 + s2/2) / (Factorial[4*n0 + 2] * (1 + (-4)^n0 - 2^(4*n0 + 1)));
];
Numerator[frac]
]
PROG
(Python)
from sympy import binomial, bernoulli, factorial
def a(n):
if n%2 == 1: # 4n - 1
n = n//2 + 1
s = sum(
(-1)**j * binomial(4*n, 2*j) * bernoulli(4*n-2*j) * bernoulli(2*j)
for j in range(2*n + 1)
)
frac = -2**(4*n-2) * s / factorial(4*n)
else: # 4n + 1
n //= 2
s1 = sum(
(-4)**(n+j) * binomial(4*n+2, 4*j) * bernoulli(4*n-4*j+2) * bernoulli(4*j)
for j in range(n+1)
)
s2 = sum(
(-4)**j * binomial(4*n+2, 2*j) * bernoulli(4*n-2*j+2) * bernoulli(2*j)
for j in range(2*n+2)
)
frac = 2**(4*n+1) * (s1+s2/2) / factorial(4*n+2) / (1 + (-4)**n - 2**(4*n+1))
return frac.numerator
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Jwalin Bhatt, Apr 08 2026
STATUS
approved
