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.

Showing 1-3 of 3 results.

A291657 Primes p such that p is a primitive root modulo prime(p).

Original entry on oeis.org

2, 3, 7, 11, 13, 41, 71, 79, 83, 107, 109, 131, 139, 157, 163, 173, 179, 191, 211, 223, 229, 263, 271, 277, 293, 311, 313, 317, 337, 353, 359, 367, 373, 389, 419, 431, 439, 449, 457, 463, 479, 521, 547, 569, 577, 593, 607, 641, 661, 709, 719, 727, 743, 757, 761, 769, 787, 811, 823, 827
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

The conjecture in A291615 implies that the current sequence has infinitely many terms. In fact, if there are only finitely many primes p with p a primitive root modulo prime(p) and we let P denote the product of all such primes, then by Dirichlet's theorem there is a prime q == 1 (mod 4*P) and hence any prime p with p a primitive root modulo prime(p) is a quadratic residue modulo q and hence not a primitive root modulo q.
Conjecture: a(n)/(n*log(n)) has a positive limit as n tends to the infinity. Equivalently, all the terms in this sequence form a subset of the set of all primes with positive asymptotic density.

Examples

			a(1) = 2 since the first prime 2 is a primitive root modulo prime(2) = 3.
a(2) = 3 since the prime 3 is a primitive root modulo prime(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n];
    n=0;Do[Do[If[Mod[p[k]^(Part[Divisors[p[p[k]]-1],i])-1,p[p[k]]]==0,Goto[aa]],{i,1,Length[Divisors[p[p[k]]-1]]-1}];
    n=n+1;Print[n," ",p[k]];Label[aa],{k,1,145}]

A291690 Least positive integer g which is a primitive root modulo prime(n) and also a primitive root modulo prime(n+1).

Original entry on oeis.org

5, 2, 3, 17, 2, 6, 3, 10, 10, 3, 13, 13, 12, 5, 5, 2, 2, 2, 7, 11, 28, 6, 6, 7, 7, 11, 5, 6, 6, 3, 6, 6, 3, 2, 12, 6, 18, 20, 5, 2, 2, 21, 19, 5, 3, 3, 3, 5, 6, 6, 21, 7, 14, 6, 5, 7, 15, 6, 11, 3, 3, 5, 22, 17, 14, 3, 29, 15, 2, 13, 13, 19, 6, 2, 10, 10, 18, 6, 21, 26
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 29 2017

Keywords

Comments

Clearly, a(n) < prime(n)*prime(n+1) by the Chinese Remainder Theorem. It seems that for any positive integer n other than 1, 4, 8 there is a prime p < prime(n) which is a primitive root modulo prime(n) and also a primitive root modulo prime(n+1).
Conjecture: (i) For any distinct primes p and q, there is a positive integer g not exceeding sqrt(4*p*q+1) such that g is a primitive root modulo p and also a primitive root modulo q. We may require further that g < sqrt(p*q) if {p,q} is not among the 15 pairs {2,3}, {2,11}, {2,13}, {2,59}, {2,131}, {2,181}, {3,7}, {3,31}, {3,79}, {3,191}, {3,199}, {5,271}, {7,11}, {7,13} and {7,71}.
(ii) For each integer n > 1, there is a constant c(n) > 0, such that for any n distinct primes p(1),...,p(n) there is a positive integer g < c(n)*(p(1)*...*p(n))^(1/n) which is a primitive root modulo p(k) for all k = 1,...,n.

Examples

			a(1) = 5 since 5 is a primitive root modulo prime(1) = 2 and also a primitive root modulo prime(2) = 3, but none of 1, 2, 3, 4 has this property.
a(2) = 2 since 2 is a primitive root modulo prime(2) = 3 and also a primitive root modulo prime(3) = 5.
a(4) = 17 since 17 is the least positive integer which is a primitive root modulo prime(4) = 7 and also a primitive root modulo prime(5) = 11.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=Prime[n];
    Do[g=0;Label[aa];g=g+1;If[Mod[g,p[n]]==0||Mod[g,p[n+1]]==0,Goto[aa]];Do[If[Mod[g^(Part[Divisors[p[n]-1],i])-1,p[n]]==0,Goto[aa]],{i,1,Length[Divisors[p[n]-1]]-1}];
    Do[If[Mod[g^(Part[Divisors[p[n+1]-1],j])-1,p[n+1]]==0,Goto[aa]],{j,1,Length[Divisors[p[n+1]-1]]-1}];Print[n," ",g],{n,1,80}]
  • PARI
    a(n,p=prime(n))=my(q=nextprime(p+1),g=2); while(gcd(g,p*q)>1 || znorder(Mod(g,p))Charles R Greathouse IV, Aug 30 2017

A293213 Primes p with phi(p-1) a primitive root modulo p, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

2, 5, 23, 43, 47, 67, 101, 149, 167, 211, 229, 263, 269, 281, 349, 353, 359, 383, 389, 421, 431, 449, 461, 479, 499, 503, 509, 521, 661, 691, 709, 719, 739, 743, 829, 839, 859, 863, 883, 887, 907, 941, 953, 971, 983, 991, 1031, 1087, 1103, 1109, 1163, 1181, 1229, 1237, 1279, 1291, 1319, 1327, 1367, 1373
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 02 2017

Keywords

Comments

It is well known that for any prime p the number of distinct primitive roots modulo p among 1,...,p-1 is phi(p-1).
Conjecture: The sequence contains infinitely many terms. Moreover, the number of primes p <= x with phi(p-1) a primitive root modulo p is asymptotically equivalent to c*x/(log x) as x tends to the infinity, where c is a constant with 0.36 < c < 0.37.

Examples

			a(2) = 5 since phi(5-1) = 2 is a primitive root modulo the prime 5.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n];
    n=0;Do[Do[If[Mod[EulerPhi[p[k]-1]^(Part[Divisors[p[k]-1],i])-1,p[k]]==0,Goto[aa]],{i,1,Length[Divisors[p[k]-1]]-1}];
    n=n+1;Print[n," ",p[k]];Label[aa],{k,1,220}]
Showing 1-3 of 3 results.