OFFSET
1,9
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..21218
MATHEMATICA
Table[If[PrimeQ[n], 1, GCD[n, Denominator[BernoulliB[n-1]]]], {n, 100}] (* Harvey P. Dale, Sep 07 2017 *)
PROG
(PARI) a(n)=if(isprime(n), 1, gcd(denominator(bernfrac(n-1)), n)) \\ Charles R Greathouse IV, Jun 20 2011
(PARI) a(n)=my(b=bernfrac(n-1)); denominator(b)/denominator(b*n)/if(isprime(n), n, 1) \\ Charles R Greathouse IV, Jun 20 2011
(PARI) a(n)=if(isprime(n), 1, my(b=bernfrac(n-1)); denominator(b)/denominator(b*n)) \\ Charles R Greathouse IV, Jun 20 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Oct 07 2009
STATUS
approved