login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108989 Composite numbers k with primitive root 2; i.e., the order of 2 modulo k is phi(k). 4

%I #48 Nov 10 2023 09:24:07

%S 9,25,27,81,121,125,169,243,361,625,729,841,1331,1369,2187,2197,2809,

%T 3125,3481,3721,4489,6561,6859,6889,10201,11449,14641,15625,17161,

%U 19321,19683,22201,24389,26569,28561,29929,32041,32761,38809,44521,50653

%N Composite numbers k with primitive root 2; i.e., the order of 2 modulo k is phi(k).

%C 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

%H Amiram Eldar, <a href="/A108989/b108989.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..100 from Alois P. Heinz)

%e Modulo 9: 2^1 == 2, 2^2 == 4, 2^3 == 8, 2^4 == 7, 2^5 == 5, 2^6 == 1 and phi(9) == 6.

%t nn=51000; Select[Complement[Range[2, nn], Prime[Range[PrimePi[nn]]]], PrimitiveRoot[#] == 2&] (* _Harvey P. Dale_, Jul 25 2011 *)

%t 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 *)

%o (GAP) for i in [2..100000] do if not IsPrime(i) then if IsPrimitiveRootMod(2,i) then Display(i); fi; fi; od;

%o (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 */

%Y Intersection of A002808 and A167791.

%Y Cf. A000010, A001122, A002326, A216838, A216848, A219030.

%K nonn

%O 1,1

%A Douglas Stones (dssto1(AT)student.monash.edu.au), Jul 28 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 07:44 EDT 2024. Contains 375113 sequences. (Running on oeis4.)