OFFSET
1,6
COMMENTS
LINKS
Wikipedia, Bernoulli number
EXAMPLE
Prime(6) = 13 and B(12) = -691/2730, so a(6) = -691/13 + 2730/13^2 = -37.
MATHEMATICA
a[n_] := With[{p = Prime[n]}, With[{b = BernoulliB[p - 1]}, (p Numerator[b] + Denominator[b])/p^2]];
Table[a[n], {n, 1, 18}]
PROG
(PARI) a(n) = my(p = prime(n), b = bernfrac(p-1)); numerator(b)/p + denominator(b)/p^2; \\ Michel Marcus, Aug 16 2019
CROSSREFS
KEYWORD
sign
AUTHOR
Jonathan Sondow, Aug 15 2019
STATUS
approved