OFFSET
2,4
COMMENTS
REFERENCES
Paulo Ribenboim, The New Book of Prime Number Records, Springer, 1996, p. 105-112.
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..337
Paul Erdős, On the converse of Fermat's theorem, Amer. Math. Monthly 56 (1949), p. 623-624.
D. H. Lehmer, On the converse of Fermat's theorem, Amer. Math. Monthly 43 (1936), p. 347-354.
EXAMPLE
a(9) = 683 because prime(9) = 23 and 683 is the largest factor of 2^22-1 that yields a pseudoprime when multiplied by 23.
MATHEMATICA
Table[p=Prime[n]; q=Reverse[Transpose[FactorInteger[2^(p-1)-1]][[1]]]; i=1; While[i<=Length[q]&&(PowerMod[2, p*q[[i]]-1, p*q[[i]]]>1), i++ ]; If[i>Length[q], 0, q[[i]]], {n, 2, 40}]
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
T. D. Noe, Jul 08 2003
STATUS
approved