OFFSET
1,1
COMMENTS
There exist no even numbers with primitive root 2. All entries are odd. They are all the powers of odd primes. - V. Raman, Nov 20 2012
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..100 from Alois P. Heinz)
EXAMPLE
Modulo 9: 2^1 == 2, 2^2 == 4, 2^3 == 8, 2^4 == 7, 2^5 == 5, 2^6 == 1 and phi(9) == 6.
MATHEMATICA
nn=51000; Select[Complement[Range[2, nn], Prime[Range[PrimePi[nn]]]], PrimitiveRoot[#] == 2&] (* Harvey P. Dale, Jul 25 2011 *)
seq[max_] := Module[{ps = Select[Range[2, Floor[Sqrt[max]]], PrimeQ], s = {}}, Do[s = Join[s, Select[p^Range[2, Floor[Log[p, max]]], PrimitiveRoot[#] == 2 &]], {p, ps}]; Sort[s]]; seq[10^5] (* Amiram Eldar, Nov 10 2023 *)
PROG
(GAP) for i in [2..100000] do if not IsPrime(i) then if IsPrimitiveRootMod(2, i) then Display(i); fi; fi; od;
(PARI) for(n=3, 100000, if(n%2==1&&isprime(n)==0&&znorder(Mod(2, n))==eulerphi(n), print1(n", "))) /* V. Raman, Nov 20 2012 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Douglas Stones (dssto1(AT)student.monash.edu.au), Jul 28 2005
STATUS
approved
