A326584 a(n) = gcd(n*N(n-1), D(n-1)), with N(n)/D(n) = B(n) the n-th Bernoulli number.
1, 2, 3, 1, 5, 1, 7, 1, 3, 1, 11, 1, 13, 1, 3, 1, 17, 1, 19, 1, 3, 1, 23, 1, 5, 1, 3, 1, 29, 1, 31, 1, 3, 1, 1, 1, 37, 1, 3, 1, 41, 1, 43, 1, 15, 1, 47, 1, 7, 1, 3, 1, 53, 1, 1, 1, 3, 1, 59, 1, 61, 1, 3, 1, 5, 1, 67, 1, 3, 1, 71, 1, 73, 1, 3, 1, 1, 1, 79, 1
Offset: 1
Keywords
Examples
a(559) = 1 and 559 is in A121707. a(561) = 561 and 561 is Carmichael. a(563) = 563 and 563 is prime.
Links
- Peter Luschny, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
db := n -> denom(bernoulli(n)): nb := n -> numer(bernoulli(n)): a := n -> igcd(n*nb(n-1), db(n-1)): seq(a(n), n=1..80);
-
Mathematica
a[n_] := With[{b = BernoulliB[n-1]}, GCD[n Numerator[b], Denominator[b]]]; Array[a, 80] (* Jean-François Alcover, Jul 21 2019 *)
-
PARI
a(n) = my(b=bernfrac(n-1)); gcd(n*numerator(b), denominator(b)); \\ Michel Marcus, Jul 19 2019
Formula
a(n) divides n, n/a(n) = A326478(n).
Comments