OFFSET
1,2
COMMENTS
Theorem: If both numbers q and 2q-1 are primes then n=q*(2q-1) is in the sequence iff q=3 or q is of the form 10k+1. 15,1891,88831,146611,218791,721801,873181,... are such terms.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[15000], ! PrimeQ[ # ] && Mod[5^#, # ] == Mod[5, # ] &]
Join[{1, 4}, Select[Range[15000], CompositeQ[#]&&PowerMod[5, #, #]==5&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, Sep 12 2006
STATUS
approved