login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094950 Number of integer coefficients in n-th Bernoulli polynomial (including zeros). 1
1, 1, 2, 2, 4, 3, 4, 4, 5, 7, 8, 8, 10, 8, 8, 8, 12, 9, 14, 12, 13, 15, 14, 12, 17, 16, 14, 18, 22, 21, 16, 16, 24, 24, 24, 27, 34, 28, 26, 26, 30, 25, 30, 28, 28, 32, 26, 26, 35, 32, 31, 37, 33, 27, 36, 39, 45, 46, 39, 39, 43, 40, 32, 32, 47, 51, 54, 47, 45, 49, 51 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
B(5,x) = x^5 - 5/2*x^4 + 5/3*x^3 + 0*x^2 - 1/6*x + 0 hence a(5) = 3
MAPLE
f:= proc(n) local B;
B:= bernoulli(n, x);
nops(select(t -> coeff(B, x, t)::integer, [$0..degree(B)]))
end proc:
map(f, [$0..100]); # Robert Israel, Aug 28 2018
MATHEMATICA
a[n_] := Select[CoefficientList[BernoulliB[n, x], x], IntegerQ] // Length;
a /@ Range[0, 100] (* Jean-François Alcover, Aug 26 2020 *)
PROG
(PARI) B(n, x)=sum(i=0, n, binomial(n, i)*bernfrac(i)*x^(n-i)); a(n)=sum(i=0, n, if(frac(polcoeff(B(n, x), i)), 0, 1))
CROSSREFS
Sequence in context: A087808 A217754 A319397 * A087874 A363341 A166267
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 19 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 12 22:48 EDT 2024. Contains 371639 sequences. (Running on oeis4.)