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.

A262264 Primes that are less than the square of their least positive primitive root.

Original entry on oeis.org

3, 7, 23, 191, 409
Offset: 1

Views

Author

Dale Taylor, Sep 17 2015

Keywords

Comments

Alternatively, primes such that the least positive primitive root is greater than the square root of p.
Next term is greater than 10^9.

Examples

			The least primitive root of 23 is 5; 5^2 is greater than 23, so 23 is in the sequence.
The least primitive root of 409 is 21; 21^2 = 441 is greater than 409, so 409 is in the sequence.
41 is not in the sequence because its least primitive root is 6, and 6^2 < 41.
		

References

Crossrefs

Cf. A001918 (least positive primitive root of n-th prime).

Programs

  • Mathematica
    Select[Prime[Range[1000]], PrimitiveRoot[#]^2 > # &]
  • PARI
    /* the following assumes that znprimroot() returns the smallest primitive root */
    forprime(p=2,10^9,my(g=znprimroot(p));if(lift(g)^2>p,print1(p,", "))); \\ Joerg Arndt, Sep 17 2015
    
  • Python
    from itertools import islice, count
    from sympy import prime, primitive_root
    def A262264_gen(): # generator of terms
        return filter(lambda p: p < primitive_root(p)**2,(prime(n) for n in count(1)))
    A262264_list = list(islice(A262264_gen(),5)) # Chai Wah Wu, Sep 14 2022