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

A237657 a(n) = |{n < m < 2*n: pi(m) and pi(m^2) are both prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 8.
(ii) For any integer n > 1 there is a prime p <= n such that n + pi(p) is prime. Also, for n > 5 there is a prime p with n < p < 2*n such that pi(p) is prime.
(iii) For each n > 20, there is a prime p with n < p < 2*n such that pi(p^2) is prime.

Examples

			a(4) = 1 since pi(6) = 3 and pi(6^2) = 11 are both prime.
a(10) = 1 since pi(17) = 7 and pi(17^2) = 61 are both prime.
a(17) = 1 since pi(33) = 11 and pi(33^2) = 181 are both prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[PrimePi[n]]&&PrimeQ[PrimePi[n^2]]
    a[n_]:=Sum[If[q[m],1,0],{m,n+1,2n-1}]
    Table[a[n],{n,1,70}]

A237643 Least positive integer m such that {A000720(k*n): k = 1, ..., m} contains a complete system of residues modulo n, or 0 if such a number m does not exist.

Original entry on oeis.org

1, 2, 3, 8, 8, 12, 13, 14, 27, 25, 32, 25, 16, 23, 94, 41, 46, 67, 38, 60, 77, 55, 84, 46, 88, 79, 85, 113, 82, 155, 114, 141, 178, 132, 124, 176, 155, 96, 135, 176, 146, 148, 126, 125, 183, 191, 185, 194, 166, 261, 378, 230, 278, 203, 199, 161, 293, 286, 175, 274
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: a(n) is always positive. Moreover, a(n) <= 2*prime(n) for all n > 0.
Note that a(15) = 94 = 2*prime(15).

Examples

			a(4) = 8 since {A000720(4*k): k = 1, ..., 8} = {2, 4, 5, 6, 8, 9, 9, 11} contains a complete system of residues modulo 4, but {pi(4*k): k = 1, ..., 7} contains no integer congruent to 3 modulo 4.
		

Crossrefs

Programs

  • Mathematica
    q[m_,n_]:=Length[Union[Table[Mod[PrimePi[k*n],n],{k,1,m}]]]
    Do[Do[If[q[m,n]==n,Print[n," ",m];Goto[aa]],{m,n,2*Prime[n]}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]

A237658 Positive integers m with pi(m) and pi(m^2) both prime, where pi(.) is given by A000720.

Original entry on oeis.org

6, 17, 33, 34, 41, 59, 60, 69, 109, 110, 111, 127, 157, 161, 246, 287, 335, 353, 367, 368, 404, 600, 709, 711, 713, 718, 740, 779, 804, 1153, 1162, 1175, 1437, 1472, 1500, 1526, 1527, 1679, 1729, 1742, 1787, 1826, 2028, 2082, 2104, 2223, 2422, 2616, 2649, 2651
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

The conjecture in A237657 implies that this sequence has infinitely many terms.
For primes in this sequence, see A237659.

Examples

			a(1) = 6 since pi(6) = 3 and pi(6^2) = 11 are both prime, but none of pi(1) = 0, pi(2) = 1, pi(3^2) = 4, pi(4^2) = 6 and pi(5^2) = 9 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[PrimePi[m]]&&PrimeQ[PrimePi[m^2]]
    n=0;Do[If[p[m],n=n+1;Print[n," ",m]],{m,1,1000}]
  • PARI
    isok(n) = isprime(primepi(n)) && isprime(primepi(n^2)); \\ Michel Marcus, Apr 28 2018

A237659 Primes p with pi(p) and pi(p^2) both prime, where pi(.) is given by A000720.

Original entry on oeis.org

17, 41, 59, 109, 127, 157, 353, 367, 709, 1153, 1787, 3319, 3407, 3911, 5851, 6037, 6217, 6469, 8389, 9103, 9319, 10663, 13709, 14107, 14591, 15683, 18433, 19463, 19577, 20107, 21727, 23209, 27809, 29383, 32797, 35023, 36251, 36599, 38351, 39239
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 11 2014

Keywords

Comments

This is a subsequence of A237658.
Conjecture: The sequence has infinitely many terms.

Examples

			a(1) = 17 with pi(17) = 7 and pi(17^2) = 61 both prime.
a(2) = 41 with pi(41) = 13 and pi(41^2) = 263 both prime.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[PrimePi[m^2]]
    n=0;Do[If[p[Prime[Prime[k]]],n=n+1;Print[n," ",Prime[Prime[k]]]],{k,1,1000}]
    Select[Prime[Range[4500]],AllTrue[{PrimePi[#],PrimePi[#^2]},PrimeQ]&] (* Harvey P. Dale, May 10 2025 *)

A237687 Primes p with pi(p), pi(pi(p)) and pi(p^2) all prime, where pi(.) is given by A000720.

Original entry on oeis.org

59, 127, 709, 1153, 1787, 9319, 13709, 19577, 32797, 35023, 39239, 40819, 53353, 62921, 75269, 90023, 161159, 191551, 218233, 228451, 235891, 238339, 239087, 272999, 289213, 291619, 339601, 439357, 500741, 513683
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 11 2014

Keywords

Comments

This is a subsequence of A237659.
Conjecture: The sequence has infinitely many terms.

Examples

			a(1) = 59 with 59, pi(59) = 17, pi(pi(59)) = pi(17) = 7 and pi(59^2) = 487 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[PrimePi[m^2]]
    n=0;Do[If[p[Prime[Prime[Prime[k]]]],n=n+1;Print[n," ",Prime[Prime[Prime[k]]]]],{k,1,1000}]
Showing 1-5 of 5 results.