%I #46 Feb 21 2022 01:12:37
%S 1,7,13,17,19,31,37,43,47,49,59,61,67,71,73,79,91,97,101,103,107,109,
%T 127,133,137,139,149,151,157,163,167,169,181,193,197,199,211,217,223,
%U 227,229,241,247,257,259,263,269,271,277,283,289
%N Bernoulli number B_{2n} has denominator 6.
%C All primes in A053176 are in the sequence. If n is in the sequence, its factorization contains only primes in A053176. - _Benoit Cloitre_, Oct 19 2002
%C B(2n) has denominator 6 iff (n^2-1)*B(2n) is an integer. - _Benoit Cloitre_, Feb 15 2004
%C Subsequence of A156543. - _Reinhard Zumkeller_, Feb 10 2009
%D B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 76.
%H T. D. Noe, <a href="/A045979/b045979.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Be#Bernoulli">Index entries for sequences related to Bernoulli numbers.</a>
%F a(n) seems to be asymptotic to c*n, 5 < c < 6. - _Benoit Cloitre_, Oct 19 2002
%t ok[n_] := IntegerQ[(n^2 - 1)*BernoulliB[2n]]; Select[Range[300], ok] (* _Jean-François Alcover_, Jun 27 2012, after _Benoit Cloitre_ *)
%t result = {}; Do[count = 0;
%t Do[If[Not[PrimeQ[2*Divisors[n][[i]] + 1]], count++],
%t {i, 2, DivisorSigma[0, n]}]; If[count == DivisorSigma[0, n] - 1, AppendTo[result, n]], {n, 1, 10000}]; result (* _Richard R. Forberg_, Aug 06 2016 *)
%t Position[BernoulliB[2 Range[300]],_?(Denominator[#]==6&)]//Flatten (* _Harvey P. Dale_, Jan 28 2017 *)
%o (PARI) isok(n) = denominator(bernfrac(2*n)) == 6; \\ _Michel Marcus_, Feb 06 2016
%o (Magma) [n: n in [0..400] | Denominator(Bernoulli(2*n)) eq 6]; // _Vincenzo Librandi_, Feb 06 2016
%Y Cf. A051222, A053176, A156543.
%K nonn,nice,easy
%O 1,2
%A _N. J. A. Sloane_