login
A043295
Sum of digits of numerator of Bernoulli number B(2n).
2
1, 1, 1, 1, 5, 16, 7, 17, 28, 20, 26, 34, 25, 47, 53, 44, 79, 79, 88, 82, 88, 86, 104, 146, 113, 152, 145, 164, 152, 158, 160, 206, 164, 190, 193, 250, 205, 262, 259, 341, 257, 278, 331, 301, 323, 362, 295, 356, 349, 355, 346, 359, 380, 475, 457, 449, 415, 464
OFFSET
1,5
FORMULA
a(n) = A007953(A000367(n)). - Michel Marcus, Feb 16 2021
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