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

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

A238570 a(n) = |{0 < k < n: pi((k+1)^2) - pi(k^2) and pi(n^2) - pi(k^2) are both prime}|, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) If n > 4, then pi(n^2) + pi(k^2) is prime for some k = 2, ..., n-1.
(iii) If n > 0 is not a divisor of 12, then n^2 + pi(k^2) is prime for some k = 2, ..., n-1.

Examples

			a(8) = 1 since pi(8^2) - pi(7^2) = 18 - 15 = 3 is prime.
a(61) = 1 since pi(27^2) - pi(26^2) = 129 - 122 = 7 and pi(61^2) - pi(26^2) = 519 - 122 = 397 are both prime.
a(86) = 1 since pi(3^2) - pi(2^2) = 4 - 2 = 2 and pi(86^2) - pi(2^2) = 939 - 2 = 937 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,n_]:=PrimeQ[PrimePi[(k+1)^2]-PrimePi[k^2]]&&PrimeQ[PrimePi[n^2]-PrimePi[k^2]]
    a[n_]:=Sum[If[p[k,n],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]
Showing 1-2 of 2 results.