A084217 Number of k's 1 <= k <= n dividing the numerator of 2n-th Bernoulli number.
1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 3, 2, 1, 2, 2, 1, 2, 1, 2, 2, 4, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 4, 2, 2, 2, 2, 3, 2, 1, 2, 2, 3, 2, 4, 1, 2, 2, 1, 2, 2, 1, 4, 2, 2, 3, 2, 1, 4, 2, 2, 2, 5, 1, 2, 3, 2, 1, 2, 2, 2, 2, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..5530
- Wikipedia, Bernoulli numbers.
Crossrefs
Cf. A000367.
Programs
-
Mathematica
a[n_] := Count[Range[n], ?(Divisible[Numerator[BernoulliB[2*n]], #] &)]; Array[a, 100] (* _Amiram Eldar, Apr 27 2025 *)
-
PARI
a(n)=sum(k=1,n,if(numerator(bernfrac(2*n))%k,0,1))
Extensions
Missing a(1)=1 inserted and data section extended to a(105) by Antti Karttunen, Jan 19 2025