OFFSET
1,2
COMMENTS
Numbers n such that the congruence k^(2n+1) == k (mod n) is true for 1<=k<=n. - Michel Lagneau, May 02 2012
In 2005, B. C. Kellner proved E. W. Weisstein's conjecture that denom(B_n) = n only if n = 1806. - Jonathan Sondow, Oct 14 2013.
LINKS
Joerg Arndt, Table of n, a(n) for n = 1..594 (terms <= 10^8)
Bernd C. Kellner, The equation denom(B_n) = n has only one solution, preprint 2005.
Victor Miller, Re: Q about a property of Bernoulli denominators, NMBRTHRY list, May 5, 2012
Eric Weisstein's World of Mathematics, Bernoulli Number
MAPLE
for n from 1 to 10000 do:
m:=2*n+1: i:=1:
for k from 1 to n while(k &^ m mod n =k) do: i:=i+1: od:
if i=n then print(n) fi:
od: # Michel Lagneau, May 02 2012
A106741_list := proc(searchlimit) local isA106741, i;
isA106741 := proc(n)
numtheory[divisors](2*n);
map(i->i+1, %);
select(isprime, %);
mul(i, i=%) mod n = 0;
if % then n else NULL fi end:
seq(isA106741(i), i=1..searchlimit) end:
A106741_list(30000); # Peter Luschny, May 04 2012
MATHEMATICA
okQ[n_] := AllTrue[Range[n], PowerMod[#, 2n+1, n] == Mod[#, n]&];
Reap[For[n = 1, n < 50000, n++, If[okQ[n], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jun 11 2019, after Michel Lagneau *)
PROG
(PARI) is_A106741(n)=denominator(bernfrac(2*n))%n==0 \\ Charles R Greathouse IV, May 02 2012
(PARI){ for (n=1, 10^6, m = 2*n + 1; for (k=2, n, if ( Mod(k, n)^m != k, next(2) ); ); print1(n, ", "); ); } /* Joerg Arndt, May 04 2012 */
(PARI) is_A106741(n)={ my(m=2*n+1); for(k=2, n, Mod(k, n)^m - k & return); 1} /* more than twice faster (in PARI 2.4.2) than with "if(...)" */ \\ M. F. Hasler, May 06 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 15 2005
EXTENSIONS
Terms a(19)-a(29) from Michel Lagneau, May 02 2012
Terms >= 10230 by Joerg Arndt, May 04 2012
STATUS
approved