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.

A001123 Primes with 3 as smallest primitive root.

Original entry on oeis.org

7, 17, 31, 43, 79, 89, 113, 127, 137, 199, 223, 233, 257, 281, 283, 331, 353, 401, 449, 463, 487, 521, 569, 571, 593, 607, 617, 631, 641, 691, 739, 751, 809, 811, 823, 857, 881, 929, 953, 977, 1013, 1039, 1049, 1063, 1087, 1097, 1193, 1217
Offset: 1

Views

Author

Keywords

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 57.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001122, A001124, etc.
Cf. A019334.

Programs

  • Mathematica
    Prime[ Select[ Range[200], PrimitiveRoot[ Prime[ # ]] == 3 & ]]
    (* or *)
    Select[ Prime@Range@200, PrimitiveRoot@# == 3 &] (* Robert G. Wilson v, May 11 2001 *)
  • PARI
    forprime(p=3, 1000, if(znorder(Mod(2, p))!=p-1&&znorder(Mod(3, p))==p-1, print1(p,", ")));
    
  • PARI
    { n=0; forprime (p=3, 99999, if (znorder(Mod(2,p))!=p-1 && znorder(Mod(3,p))==p-1, n++; write("b001123.txt", n, " ", p); if (n>=1000, break) ) ) } \\ Harry J. Smith, Jun 14 2009
    
  • Python
    from itertools import islice
    from sympy import nextprime, is_primitive_root
    def A001123_gen(): # generator of terms
        p = 3
        while (p:=nextprime(p)):
            if not is_primitive_root(2,p) and is_primitive_root(3,p):
                yield p
    A001123_list = list(islice(A001123_gen(),30)) # Chai Wah Wu, Feb 13 2023

Extensions

More terms from Robert G. Wilson v, May 10 2001