cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A167791 Numbers with primitive root 2.

Original entry on oeis.org

3, 5, 9, 11, 13, 19, 25, 27, 29, 37, 53, 59, 61, 67, 81, 83, 101, 107, 121, 125, 131, 139, 149, 163, 169, 173, 179, 181, 197, 211, 227, 243, 269, 293, 317, 347, 349, 361, 373, 379, 389, 419, 421, 443, 461, 467, 491, 509, 523, 541, 547, 557, 563, 587, 613, 619
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Comments

Numbers k such that the binary expansion of 1/k has period phi(k). For example 1/27 has a period of 18 bits.
All entries are odd. An odd composite number n can have a primitive root if and only if it is a prime power (see A033948). - V. Raman, Oct 04 2012
It is unknown whether there is a prime p such that p is in this sequence while p^2 is not. - Jianing Song, Jan 27 2019

Crossrefs

Cf. A000010, A001122 (primes with primitive root 2), A033948.

Programs

  • Magma
    [n: n in [3..619] | IsPrimitive(2, n)]; // Arkadiusz Wesolowski, Dec 22 2020
  • Mathematica
    pr=2; Select[Range[2,2000], MultiplicativeOrder[pr,# ] == EulerPhi[ # ] &]
  • PARI
    for(n=3,200,if(n%2==1&&znorder(Mod(2,n))==eulerphi(n),printf(n","))) \\ V. Raman, Oct 04 2012
    
  • PARI
    is(n)=n%2 && isprimepower(n) && znorder(Mod(2,n))==eulerphi(n-1) \\ Charles R Greathouse IV, Jul 05 2013