OFFSET
1,2
COMMENTS
The initial 1 is conventional.
647089 is the smallest composite number of this sequence (which makes it different from A081762).
The next composite number in this sequence is a(1000) = F_5 = 4294967297. - Robert G. Wilson v, Jul 25 2015
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1598
MATHEMATICA
fQ[n_] := PowerMod[2, n - 1, (n - 1)^2 - 1] == 1; Select[ Range[3, 1200000], fQ] (* Robert G. Wilson v, Jul 25 2015 *)
PROG
(PARI) forstep(n=1, 1e7, 2, Mod(2, (n-1)^2-1)^(n-1)==1&&print1(n", "))
(Magma) [n: n in [3..6*10^5] | (2^(n-1)-1) mod ((n-1)^2-1) eq 0]; // Vincenzo Librandi, Jul 26 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 24 2015
STATUS
approved