login
(Denominator of Bernoulli(2*n)) read mod n.
2

%I #16 Jan 30 2017 05:44:27

%S 0,0,0,2,1,0,6,6,6,0,6,6,6,2,12,14,6,12,6,10,0,8,6,18,16,4,15,2,6,0,6,

%T 30,9,30,31,30,6,30,3,10,6,0,6,30,3,30,6,42,6,30,42,30,6,30,33,6,42,

%U 30,6,30,6,30,42,62,1,24,6,30,42,50,6,6,6,30,72,30,61

%N (Denominator of Bernoulli(2*n)) read mod n.

%C Odd terms at: 5, 27, 33, 35, 39, 45, 55, 65, 77, 81, 99, 105, 121, etc. - _Robert G. Wilson v_, Jan 26 2017

%H Seiichi Manyama, <a href="/A281662/b281662.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A002445(n) mod n.

%t f[n_] := Mod[Denominator[BernoulliB[2 n]], n]; Array[f, 77] (* _Robert G. Wilson v_, Jan 26 2017 *)

%o (Ruby)

%o def bernoulli(n)

%o ary = []

%o a = []

%o (0..n).each{|i|

%o a << 1r / (i + 1)

%o i.downto(1){|j| a[j - 1] = j * (a[j - 1] - a[j])}

%o ary << a[0]

%o }

%o ary

%o end

%o def A281662(n)

%o a = bernoulli(2 * n)

%o (1..n).map{|i| a[2 * i].denominator % i}

%o end

%o (PARI) a(n) = denominator(bernfrac(2*n)) % n; \\ _Michel Marcus_, Jan 29 2017

%Y Cf. A002445, A106741, A281648.

%K nonn

%O 1,4

%A _Seiichi Manyama_, Jan 26 2017