|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
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()))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|