OFFSET
1,1
COMMENTS
The square of every prime is here, as are the semiprimes in A179839.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
341 is a term because 341 = 11*31 and 2^11 mod 31 = 2^31 mod 11.
MATHEMATICA
fQ[n_] := Block[{fi = Flatten[ Table[ First@ #, {Last@ #}] & /@ FactorInteger@ n]}, Length@ fi == 2 && PowerMod[2, fi[[2]], fi[[1]]] == PowerMod[2, fi[[1]], fi[[2]]]]; Select[ Range@ 12000, fQ]
With[{nn=50}, Take[Union[Times@@@Select[Tuples[Prime[Range[2nn]], 2], PowerMod[ 2, #[[1]], #[[2]]]==PowerMod[2, #[[2]], #[[1]]]&]], nn]] (* Harvey P. Dale, Sep 03 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jan 10 2011
STATUS
approved