OFFSET
1,2
COMMENTS
From Dean Hickerson, Oct 19 2007: (Start)
Except for a(0)=1, all denominators in A002445 are divisible by 6 and are squarefree. To test such a number k to see if it's in the sequence, let 2n be the least common multiple of all p-1 for which p is a prime divisor of k.
Now list the primes p such that p-1 divides 2n. If all of them are divisors of k, then k is in the sequence; otherwise it's not.
For example, consider k = 78 = 2 * 3 * 13. The LCM of 2-1, 3-1 and 13-1 is 12, so 2n=12. The primes p such that p-1 divides 12 are 2, 3, 5, 7 and 13. Since 5 and 7 are not divisors of 78, 78 is not in the sequence. (End)
From Paul Curtz, Oct 19 2012: (Start)
a(n+3) mod 9 = 6,3,6,3,3,3,6,3,3,6,3,6,6,6,.... (Also a(n+3) in base 9 mod 10.)
(a(n+2)-2)/4 = 0, 1, 7, 10, 16, 34, 70, 82, 88, 124, .... See A002445.
(a(n+4) - a(n+3))/12 = 2, 1, 3, 6, 12, 4, 2, 12, 1, 11, .... Is this always an integer? (End)
REFERENCES
H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1001
FORMULA
We know from the von Staudt-Clausen theorem (see Rademacher) that the denominator of the Bernoulli number B_{2k} is the product of those distinct primes p for which p-1 divides 2k. In particular, all numbers after the first two (which are the denominators of B_0 and B_1) are divisible by 6. - N. J. A. Sloane, Feb 10 2004
MATHEMATICA
Take[Union@Table[Denominator[BernoulliB[k]], {k, 0, 2000}], 80] (* Vladimir Joseph Stephan Orlovsky, Jul 06 2011 *)
PROG
(PARI) is(n)=if(n==1, 1, my(f=factor(n)); if(vecmax(f[, 2])>1, return(0)); fordiv(lcm(apply(k->k-1, f[, 1])), k, if(isprime(k+1) && n%(k+1), return(0))); 1) \\ Charles R Greathouse IV, Nov 26 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 10 2004
EXTENSIONS
Extended by Robert G. Wilson v, Feb 10 2004
STATUS
approved