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

A237705 Number of primes p < n with pi(n-p) prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 11 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 12, 26, 27, 32, 68.
(ii) For any integer n > 5, there is a prime p <= n with pi(n+p) prime.
(iii) If n > 32, then pi((n-p)^2) is prime for some prime p < n. Also, for each n > 6 there is an odd prime p < 2*n with pi((n - (p-1)/2)^2) prime.
(iv) Any integer n > 11 can be written as p + q with p and pi(q^2 + q + 1) both prime.
(v) Each integer n > 34 can be written as k + m with k and m positive integers such that pi(k^2) and pi(2*m^2) are both prime.

Examples

			a(5) = 1 since 2 and pi(5-2) = pi(3) = 2 are both prime.
a(12) = 1 since 7 and pi(12-7) = pi(5) = 3 are both prime.
a(15) = 2 since 3 and pi(15-3) = pi(12) = 5 are both prime, and 11 and pi(15-11) = pi(4) = 2 are both prime.
a(26) = 1 since 23 and pi(26-23) = 2 are both prime.
a(27) = 1 since 23 and pi(27-23) = 2 are both prime.
a(32) = 1 since 29 and pi(32-29) = 2 are both prime.
a(68) = 1 since 37 and pi(68-37) = pi(31) = 11 are both prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[PrimePi[n]]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,70}]

A237497 a(n) = |{0 < k <= n/2: pi(k*(n-k)) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 10, and a(n) = 1 for no n > 51. Moreover, for any integer n > 10, there is a positive integer k < n with 2*k + 1 and pi(k*(n-k)) both prime.

Examples

			a(6) = 1 since 6 = 1 + 5 with pi(1*5) = 3 prime.
a(8) = 1 since 8 = 2 + 6 with pi(2*6) = pi(12) = 5 prime.
a(25) = 1 since 25 = 4 + 21 with pi(4*21) = pi(84) = 23 prime.
a(51) = 1 since 51 = 14 + 37 with pi(14*37) = pi(518) = 97 prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,m_]:=PrimeQ[PrimePi[k*m]]
    a[n_]:=Sum[If[p[k,n-k],1,0],{k,1,n/2}]
    Table[a[n],{n,1,80}]

A237453 Number of primes p < n with p*n + pi(p) prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 for no n > 144. Moreover, for any positive integer n, there is a prime p < sqrt(2*n)*log(5n) with p*n + pi(p) prime.
(ii) For each integer n > 8, there is a prime p <= n + 1 with (p-1)*n - pi(p-1) prime.
(iii) For every n = 1, 2, 3, ... there is a positive integer k < 3*sqrt(n) with k*n + prime(k) prime.
(iv) For each n > 13, there is a positive integer k < n with k*n + prime(n-k) prime.
We have verified that a(n) > 0 for all n = 5, ..., 10^8.

Examples

			a(3) = 1 since 2 and 2*3 + pi(2) = 6 + 1 = 7 are both prime.
a(10) = 1 since 5 and 5*10 + pi(5) = 50 + 3 = 53 are both prime.
a(107) = 1 since 89 and 89*107 + pi(89) = 9523 + 24 = 9547 are both prime.
a(144) = 1 since 59 and 59*144 + pi(59) = 8496 + 17 = 8513 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[k]*n+k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    vector(100, n, sum(k=1, primepi(n-1), isprime(prime(k)*n+k))) \\ Colin Barker, Feb 08 2014

A237768 Number of primes p < n with pi(n-p) a Sophie Germain prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 12, 20, 21, 26, 27, 30, 31, 32, 60, 61, 68, 69, 80, 81.
This is stronger than part (i) of the conjecture in A237705.
We have verified that a(n) > 0 for all n = 5, ..., 2*10^7.

Examples

			a(5) = 1 since 2, pi(5-2) = pi(3) = 2 and 2*2 + 1 = 5 are all prime.
a(12) = 1 since 7, pi(12-7) = pi(5) = 3 and 2*3 + 1 = 7 are all prime.
a(81) = 1 since 47, pi(81-47) = pi(34) = 11 and 2*11 + 1 = 23 are all prime.
		

Crossrefs

Programs

  • Mathematica
    sg[n_]:=PrimeQ[n]&&PrimeQ[2n+1]
    a[n_]:=Sum[If[sg[PrimePi[n-Prime[k]]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A237496 Number of ordered ways to write n = k + m (0 < k <= m) with pi(k) + pi(m) - 2 prime, where pi(.) is given by A000720.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 4, 4, 3, 2, 3, 3, 3, 5, 3, 1, 4, 5, 5, 7, 4, 1, 2, 1, 1, 1, 1, 1, 3, 6, 7, 8, 8, 8, 8, 8, 9, 11, 11, 11, 11, 9, 7, 7, 4, 1, 2, 1, 2, 3, 5, 7, 10, 14, 14, 14, 10, 6, 10, 14, 16, 19, 16, 13, 12, 11, 10, 7, 6, 5, 3, 3, 4, 3, 6, 9, 13, 17, 18
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) Any integer n > 23 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) prime. Also, each integer n > 25 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) - 1 prime.

Examples

			a(6) = 1 since 6 = 3 + 3 with pi(3) + pi(3) - 2 = 2 + 2 - 2 = 2 prime.
a(17) = 1 since 17 = 2 + 15 with pi(2) + pi(15) - 2 = 1 + 6 - 2 = 5 prime.
a(99) = 1 since 99 = 1 + 98 with pi(1) + pi(98) - 2 = 0 + 25 - 2 = 23 prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    p[k_,m_]:=PQ[PrimePi[k]+PrimePi[m]-2]
    a[n_]:=Sum[If[p[k,n-k],1,0],{k,1,n/2}]
    Table[a[n],{n,1,80}]

A261627 Number of primes p such that n-(p*n'-1) and n+(p*n'-1) are both prime, where n' is 1 or 2 according as n is odd or even.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 27 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6, and a(n) = 1 only for n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142.
This is stronger than Goldbach's conjecture (A002375) and Lemoine's conjecture (A046927).
I have verified the conjecture for n up to 10^8.
Verified for n up to 10^9. - Mauro Fiorentini, Jul 05 2023
Conjecture verified for n < 1.2 * 10^12. - Jud McCranie, Aug 26 2023

Examples

			a(19) = 1 since 13, 19-(13-1) = 7 and 19+(13-1) = 31 are all prime.
a(142) = 1 since 41, 142-(2*41-1) = 61 and 142+(2*41-1) = 223 are all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-(3+(-1)^n)/2*Prime[k]+1]&&PrimeQ[n+(3+(-1)^n)/2*Prime[k]-1],r=r+1],{k,1,PrimePi[2n/(3+(-1)^n)]}];Print[n," ",r];Continue,{n,1,80}]

A237291 Number of ways to write 2*n - 1 = p + q + r (p <= q <= r) with p, q, r, pi(p), pi(q), pi(r) all prime, where pi(x) denotes the number of primes not exceeding x (A000720).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 36.
This is stronger than Goldbach's weak conjecture finally proved by H. A. Helfgott in 2013.

Examples

			a(16) = 1 since 2*16 - 1 = 3 + 11 + 17 with 3, 11, 17, pi(3) = 2, pi(11) = 5 and pi(17) = 7 all prime.
a(179) = 1 since 2*179 - 1 = 83 + 83 + 191 with 83, 191, pi(83) = 23 and pi(191) = 43 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[PrimePi[n]]
    a[n_]:=Sum[If[p[2n-1-Prime[Prime[i]]-Prime[Prime[j]]],1,0],{i,1,PrimePi[PrimePi[(2n-1)/3]]},{j,i,PrimePi[PrimePi[(2n-1-Prime[Prime[i]])/2]]}]
    Table[a[n],{n,1,80}]

A238597 Number of primes p < 2*n with 2*pi(p) + 1 and p*(2n-1) - 2 both prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1, and a(n) = 1 for no n > 195.
(ii) For any integer n > 1, there is a prime p < 2*n with 2*pi(p) + 1 (or 2*pi(p) - 1) and 2*n + p both prime.
Part (i) of this conjecture is an extension of the conjecture in A238580.

Examples

			a(9) = 1 since 5, 2*pi(5) + 1 = 2*3 + 1 = 7 and 5*(2*9-1) - 2 = 5*17 - 2 = 83 are all prime.
a(28) = 1 since 3, 2*pi(3) + 1 = 2*2 + 1 = 5 and 3*(2*28-1) - 2 = 3*55 - 2 = 163 are all prime.
a(195) = 1 since 71, 2*pi(71) + 1 = 2*20 + 1 = 41 and 71*(2*195-1) - 2 = 27617 are all prime.
		

Crossrefs

Programs

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

A239617 Number of ways to write 2*n = p + q with p, q and pi(2*p) - pi(p) all prime, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 22 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) Each integer n > 5 can be written as p + q (q > 0) with p and pi(2*q) - pi(q) both prime.
(iii) Any integer n > 2 not equal to 11 can be written as p + q with p prime and pi(2*q) - pi(q) a square.
Part (i) is a refinement of Goldbach's conjecture. It implies that there are infinitely many primes p with pi(2*p) - pi(p) prime.

Examples

			a(5) = 1 since 2*5 = 7 + 3 with 7, 3 and pi(2*7) - pi(7) = 6 - 4 = 2 all prime.
a(6) = 1 since 2*6 = 7 + 5 with 7, 5 and pi(2*7) - pi(7) = 2 all prime.
a(11) = 1 since 2*11 = 11 + 11 with 11 and pi(2*11) - pi(11) = 8 - 5 = 3 both prime.
a(16) = 1 since 2*16 = 13 + 19 with 13, 19 and pi(2*13) - pi(13) = 9 - 6 = 3 all prime.
a(23) = 1 since 2*23 = 23 + 23 with 23 and pi(2*23) - pi(23) = 14 - 9 = 5 both prime.
a(44) = 1 since 2*44 = 59 + 29 with 59, 29 and pi(2*59) - pi(59) = 30 - 17 = 13 all prime.
a(166) = 1 since 2*166 = 103 + 229 with 103, 229 and pi(2*103) - pi(103) = 46 - 27 = 19 all prime.
		

Crossrefs

Programs

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