OFFSET
1,5
FORMULA
EXAMPLE
Numerator(B(2*9))=43867 and 4+3+8+6+7=28 hence a(9)=28.
MATHEMATICA
Total[IntegerDigits[Numerator[#]]]&/@BernoulliB[2*Range[60]] (* Harvey P. Dale, Oct 28 2022 *)
PROG
(PARI) a(n) = sumdigits(numerator(bernfrac(2*n))); \\ Michel Marcus, Feb 16 2021
(Python)
from sympy import bernoulli
def a(n): return sum(map(int, str(abs(bernoulli(2*n).numerator()))))
print([a(n) for n in range(1, 59)]) # Michael S. Branicky, Jun 03 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Mar 24 2002
STATUS
approved