login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A166123
If n is prime, a(n) = 1; otherwise, a(n) is gcd(n, d) where d is the denominator of the (n-1)-th Bernoulli number.
1
1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 7, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 1, 1, 7, 1, 3, 1, 1, 1, 1, 1, 3, 1
OFFSET
1,9
LINKS
FORMULA
a(n) = A166120(n)/ A050932(n-1).
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
Sequence in context: A349509 A378645 A262619 * A272334 A014491 A379127
KEYWORD
nonn
AUTHOR
Paul Curtz, Oct 07 2009
STATUS
approved