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-8 of 8 results.

A242748 Number of ordered ways to write n = k + m with 0 < k <= m such that k is a primitive root modulo prime(k) and m is a primitive root modulo prime(m).

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 1, 3, 3, 2, 2, 3, 3, 2, 1, 2, 3, 3, 2, 3, 3, 3, 3, 1, 2, 3, 3, 3, 2, 1, 4, 2, 3, 3, 3, 3, 2, 5, 3, 4, 2, 4, 6, 6, 1, 5, 4, 6, 7, 4, 6, 4, 6, 3, 6, 3, 7, 5, 5, 6, 7, 4, 6, 8, 5, 6, 4, 6, 4, 8, 3, 7
Offset: 1

Views

Author

Zhi-Wei Sun, May 21 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This implies that there are infinitely many positive integers k which is a primitive root modulo prime(k).

Examples

			a(6) = 1 since 6 = 3 + 3 with 3 a primitive root modulo prime(3) = 5.
a(7) = 1 since 7 = 1 + 6 with 1 a primitive root modulo prime(1) = 2 and 6 a primitive root modulo prime(6) = 13.
a(15) = 1 since 15 = 2 + 13 with 2 a primitive root modulo prime(2) = 3 and 13 a primitive root modulo prime(13) = 41.
a(38) = 1 since 38 = 10 + 28 with 10 a primitive root modulo prime(10) = 29 and 28 a primitive root modulo prime(28) = 107.
a(53) = 1 since 53 = 3 + 50 with 3 a primitive root modulo prime(3) = 5 and 50 a primitive root modulo prime(50) = 229.
		

Crossrefs

Programs

  • Mathematica
    dv[n_]:=Divisors[n]
    Do[m=0;Do[Do[If[Mod[k^(Part[dv[Prime[k]-1],i]),Prime[k]]==1,Goto[aa]],{i,1,Length[dv[Prime[k]-1]]-1}];Do[If[Mod[(n-k)^(Part[dv[Prime[n-k]-1],j]),Prime[n-k]]==1,Goto[aa]],{j,1,Length[dv[Prime[n-k]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,n/2}];Print[n," ",m];Continue,{n,1,80}]

A242752 Primes p such that pi(p) is a primitive root modulo p, where pi(p) is the number of primes not exceeding p.

Original entry on oeis.org

2, 3, 5, 13, 17, 29, 31, 41, 47, 61, 89, 101, 107, 137, 167, 179, 193, 197, 223, 229, 251, 257, 263, 271, 293, 313, 337, 347, 353, 379, 401, 431, 439, 487, 499, 587, 593, 599, 601, 643, 647, 653, 659, 677, 701, 727, 733, 739, 751, 797, 821, 823, 829, 857, 919, 929, 941, 967, 971, 983
Offset: 1

Views

Author

Zhi-Wei Sun, May 21 2014

Keywords

Comments

According to the conjecture in A232748, this sequence should contain infinitely many primes.

Examples

			a(3) = 5 since 5 is prime with pi(5) = 3 a primitive root modulo 5.
		

Crossrefs

Programs

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

A242753 Number of ordered ways to write n = k + m with 0 < k <= m such that the inverse of k mod prime(k) among 1, ..., prime(k) - 1 is prime and the inverse of m mod prime(m) among 1, ..., prime(m) - 1 is also prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 3, 3, 2, 2, 3, 1, 2, 4, 3, 2, 3, 4, 2, 1, 2, 3, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 2, 1, 2, 3, 3, 4, 1, 1, 3, 4, 2, 4, 4, 5, 3, 4, 5, 4, 3, 5, 6, 3, 3, 6, 4, 4, 3, 5, 4, 4, 4, 6, 5, 3, 5, 6, 5, 5, 9, 5, 6, 4
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This implies that there are infinitely many positive integers k such that k*q == 1 (mod prime(k)) for some prime q < prime(k).

Examples

			a(11) = 1 since 11 = 4 + 7, 4*2 == 1 (mod prime(4)=7) with 2 prime, and 7*5 == 1 (mod Prime(7)=17) with 5 prime.
a(36) = 1 since 36 = 18 + 18, and 18*17 == 1 (mod 61) with 17 prime.
a(46) = 1 since 46 = 6 + 40, 6*11 == 1 (mod prime(6)= 13) with 11 prime, and 40*13 == 1 (mod prime(40)=173) with 13 prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    Do[m=0;Do[If[p[k]&&p[n-k],m=m+1],{k,1,n/2}];Print[n," ",m];Continue,{n,1,80}]

A242754 Positive integers k such that k*p == 1 (mod prime(k)) for some prime p < prime(k).

Original entry on oeis.org

2, 3, 4, 6, 7, 10, 11, 13, 17, 18, 21, 31, 37, 40, 41, 46, 48, 49, 52, 53, 58, 60, 64, 66, 70, 71, 72, 73, 75, 81, 85, 92, 93, 96, 100, 102, 109, 117, 119, 127, 136, 137, 140, 143, 145, 146, 149, 160, 162, 179, 189, 194, 200, 206, 215, 232, 233, 243, 246, 247
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

According to the conjecture in A242753, this sequence should have infinitely many terms.
Conjecture: The number of terms not exceeding x > 1 has the main term x/(log x) as x tends to infinity.

Examples

			a(4) = 6 since 6*11 == 1 (mod prime(6)=13) with 11 prime, but 5*9 == 1 (mod prime(5)=11) with 9 composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",k]];Continue,{k,1,247}]

A242755 Primes p such that pi(p)*q == 1 (mod p) for some prime q < p, where pi(p) is the number of primes not exceeding p.

Original entry on oeis.org

3, 5, 7, 13, 17, 29, 31, 41, 59, 61, 73, 127, 157, 173, 179, 199, 223, 227, 239, 241, 271, 281, 311, 317, 349, 353, 359, 367, 379, 419, 439, 479, 487, 503, 541, 557, 599, 643, 653, 709, 769, 773, 809, 823, 829, 839, 859, 941, 953, 1063
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

According to the conjecture in A242753, this sequence should contain infinitely many primes.
Conjecture: The number of such primes not exceeding x > 1 has the main term x/(log x)^2 as x tends to infinity.

Examples

			a(4) = 13 since 13 is prime with pi(13) = 6, and 6*11 == 1 (mod 13) with 11 prime, but pi(11)*9 == 1 (mod 11) with 9 not prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]];Continue,{k,1,179}]

A332020 Positive integers m which are quadratic residues modulo prime(m).

Original entry on oeis.org

1, 4, 5, 9, 12, 14, 16, 17, 19, 20, 22, 23, 25, 29, 30, 31, 34, 35, 36, 37, 38, 40, 42, 43, 46, 47, 49, 51, 53, 57, 59, 61, 63, 64, 66, 67, 70, 72, 73, 76, 77, 78, 80, 81, 82, 86, 87, 89, 91, 92, 94, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 111, 112, 113, 115, 121, 125, 127, 128, 132, 134, 136, 137, 138, 140
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2020

Keywords

Comments

Clearly, the sequence contains all positive squares.
Conjecture: Let A(x) be the number of terms not exceeding x. Then A(x)/x has the limit 1/2 as x tends to the infinity.

Examples

			a(1) = 1 since 1 is a quadratic residue modulo prime(1) = 2.
a(2) = 4 since 4 is a quadratic residue modulo prime(4) = 7, but 2 is a quadratic nonresidue modulo prime(2) = 3, and 3 is a quadratic nonresidue modulo prime(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    tab = {}; Do[If[JacobiSymbol[n, Prime[n]] == 1, tab = Append[tab, n]], {n, 140}]; tab
  • PARI
    isok(m) = kronecker(m, prime(m)) == 1; \\ Michel Marcus, Feb 06 2020

A332021 Elements of the set {m > 0: m is a quadratic nonresidue modulo prime(m)}.

Original entry on oeis.org

2, 3, 6, 7, 8, 10, 11, 13, 15, 18, 21, 24, 26, 27, 28, 32, 33, 39, 41, 44, 45, 48, 50, 52, 54, 55, 56, 58, 60, 62, 65, 68, 69, 71, 74, 75, 79, 83, 84, 85, 88, 90, 93, 95, 101, 107, 108, 109, 110, 114, 116, 117, 118, 119, 120, 122, 123, 124, 126, 129, 130, 131, 133, 135, 139
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2020

Keywords

Comments

This is the complement sequence of A332020.
The conjecture in A332020 implies that the number of terms not exceeding x is about x/2 asymptotically.

Examples

			a(1) = 2 since 2 is a quadratic nonresidue modulo prime(2) = 3.
a(2) = 3 since 3 is a quadratic nonresidue modulo prime(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    tab = {}; Do[If[JacobiSymbol[n, Prime[n]] == -1, tab = Append[tab, n]], {n, 140}]; tab
  • PARI
    isok(m) = kronecker(m, prime(m)) !=1; \\ Michel Marcus, Feb 06 2020

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-8 of 8 results.