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.

A225185 Primes p which do not have a primitive root that divides p+1.

Original entry on oeis.org

7, 23, 31, 43, 47, 71, 73, 79, 103, 127, 151, 157, 167, 191, 193, 199, 223, 239, 241, 263, 271, 277, 283, 311, 313, 331, 337, 359, 367, 383, 397, 409, 431, 439, 457, 463, 479, 487, 503, 571, 577, 599, 607, 631, 647, 673, 691, 719, 727, 733, 739, 743, 751, 811, 823, 839, 863, 887, 911, 919, 967, 983, 991, 997
Offset: 1

Views

Author

N. J. A. Sloane, May 04 2013

Keywords

Examples

			The primitive roots modulo 97 are 5, 7, 10, 13, 14, 15, 17, 21, 23, 26, 29, 37, 38, 39, ..., and 7 divides 98, so 97 is not a term of this sequence.
		

Crossrefs

Cf. A060749, A225184 (complement), A001122.

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | not exists{r: r in [1..p-1] | IsPrimitive(r,p) and IsZero((p+1) mod r)}]; // Bruno Berselli, May 10 2013
  • Mathematica
    q[n_] := PrimeQ[n] && AllTrue[PrimitiveRootList[n], ! Divisible[n + 1, #] &]; Select[Range[1000], q] (* Amiram Eldar, Oct 07 2021 *)
    Select[Prime[Range[200]],NoneTrue[(#+1)/PrimitiveRootList[#],IntegerQ]&] (* Harvey P. Dale, Sep 08 2024 *)
  • PARI
    forprime(p=2,1000, i=0;fordiv(p+1,X, if(znorder(Mod(X,p))==eulerphi(p), i=1)); if(i==0,print1(p", "))) \\ V. Raman, May 04 2012
    

Extensions

More terms from V. Raman, May 04 2013