OFFSET
1,4
COMMENTS
Odd terms at: 5, 27, 33, 35, 39, 45, 55, 65, 77, 81, 99, 105, 121, etc. - Robert G. Wilson v, Jan 26 2017
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A002445(n) mod n.
MATHEMATICA
f[n_] := Mod[Denominator[BernoulliB[2 n]], n]; Array[f, 77] (* Robert G. Wilson v, Jan 26 2017 *)
PROG
(Ruby)
def bernoulli(n)
ary = []
a = []
(0..n).each{|i|
a << 1r / (i + 1)
i.downto(1){|j| a[j - 1] = j * (a[j - 1] - a[j])}
ary << a[0]
}
ary
end
def A281662(n)
a = bernoulli(2 * n)
(1..n).map{|i| a[2 * i].denominator % i}
end
(PARI) a(n) = denominator(bernfrac(2*n)) % n; \\ Michel Marcus, Jan 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jan 26 2017
STATUS
approved