OFFSET
1,2
COMMENTS
Theorem: If both numbers q and 2q-1 are primes then q*(2q-1) is in the sequence iff q=2 or mod(q,14) is in the set {1, 5, 13}. 6, 703, 18721, 38503, 88831, 104653, 146611, 188191,... are such terms.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[20000], ! PrimeQ[#] && PowerMod[7, #, #] == Mod[7, #] &]
With[{nn=12000}, Select[Complement[Range[nn], Prime[Range[PrimePi[ nn]]]], PowerMod[7, #, #]==Mod[7, #]&]] (* Harvey P. Dale, Jul 12 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, Sep 12 2006
STATUS
approved