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.

A218829 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that prime(k) + 2 and prime(prime(m)) + 2 are both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 05 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 22, 25, 38, 101, 273.
(ii) Each n = 2, 3, ... can be written as k + m with k > 0 and m > 0 such that 6*k - 1, 6*k + 1 and prime(prime(m)) + 2 are all prime.
(iii) Any integer n > 5 can be written as k + m with k > 0 and m > 0 such that phi(k) - 1, phi(k) + 1 and prime(prime(m)) + 2 are all prime, where phi(.) is Euler's totient function.
(iv) If n > 2 is neither 10 nor 31, then n can be written as k + m with k > 0 and m > 0 such that prime(k) + 2 and prime(prime(prime(m))) + 2 are both prime.
(v) If n > 1 is not equal to 133, then n can be written as k + m with k > 0 and m > 0 such that 6*k - 1, 6*k + 1 and prime(prime(prime(m))) + 2 are all prime.
Clearly, each part of the conjecture implies the twin prime conjecture.
We have verified part (i) for n up to 10^9. See the comments in A237348 for an extension of this part.

Examples

			a(3) = 1 since 3 = 2 + 1 with prime(2) + 2 = 3 + 2 = 5 and prime(prime(1)) + 2 = prime(2) + 2 = 5 both prime.
a(22) = 1 since 22 = 20 + 2 with prime(20) + 2 = 71 + 2 = 73 and prime(prime(2)) + 2 = prime(3) + 2 = 5 + 2 = 7 both prime.
a(25) = 1 since 25 = 2 + 23 with prime(2) + 2 = 3 + 2 = 5 and prime(prime(23)) + 2 = prime(83) + 2 = 431 + 2 = 433 both prime.
a(38) = 1 since 38 = 35 + 3 with prime(35) + 2 = 149 + 2 = 151 and prime(prime(3)) + 2 = prime(5) + 2 = 11 + 2 = 13 both prime.
a(101) = 1 since 101 = 98 + 3 with prime(98) + 2 = 521 + 2 = 523 and prime(prime(3)) + 2 = prime(5) + 2 = 11 + 2 = 13 both prime.
a(273) = 1 since 273 = 2 + 271 with prime(2) + 2 = 3 + 2 = 5 and prime(prime(271)) + 2 = prime(1741) + 2 = 14867 + 2 = 14869 both prime.
		

Crossrefs

Programs

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

A237284 Number of ordered ways to write 2*n = p + q with p, q and A000720(p) all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 6, 13, 16, 19, 28, 34, 40, 61, 166, 278.
This is stronger than Goldbach's conjecture.
The conjecture is true for n <= 5*10^8. - Dmitry Kamenetsky, Mar 13 2020

Examples

			a(13) = 1 since 2*13 = 3 + 23 with 3, 23 and A000720(3) = 2 all prime.
a(278) = 1 since 2*278 = 509 + 47 with 509, 47 and A000720(509) = 97 all prime.
		

Crossrefs

Programs

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

A237130 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that both {3*k - 1, 3*k + 1} and {phi(m) - 1, phi(m) + 1} are twin prime pairs, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 8.
(ii) Any integer n > 6 can be written as k + m with k > 0 and m > 0 such that both {prime(k), prime(k) + 2} and {phi(m) - 1, phi(m) + 1} are twin prime pairs.
(iii) Each n = 12, 13, ... can be written as p + q (q > 0) with p, p + 6, phi(q) - 1 and phi(q) + 1 all prime.
(iv) If n > 2 is neither 10 nor 430, then n can be written as k + m with k > 0 and m > 0 such that both {3k - 1, 3*k + 1} and {6*m - 1, 6*m + 1} are twin prime pairs.
Note that each part of the above conjecture implies the twin prime conjecture.

Examples

			a(7) = 1 since 7 = 2 + 5 with 3*2 - 1 = 5, 3*2 + 1 =7, phi(5) - 1 = 3 and phi(5) + 1 = 5 all prime.
a(140) = 1 since 140 = 104 + 36 with 3*104 - 1 = 311, 3*104 + 1 = 313, phi(36) - 1 = 11 and phi(36) + 1 = 13 all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1]
    a[n_]:=Sum[If[PrimeQ[3k-1]&&PrimeQ[3k+1]&&PQ[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A237168 Number of ways to write 2*n - 1 = 2*p + q with p, q, phi(p+1) - 1 and phi(p+1) + 1 all prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 12.
(ii) Any even number greater than 4 can be written as p + q with p, q, phi(p+2) - 1 and phi(p+2) + 1 all prime.
Part (i) implies both Lemoine's conjecture (cf. A046927) and the twin prime conjecture, while part (ii) unifies Goldbach's conjecture and the twin prime conjecture.

Examples

			a(9) = 1 since 2*9 - 1 = 2*7 + 3 with 7, 3, phi(7+1) - 1 = 3 and phi(7+1) + 1 = 5 all prime.
a(934) = 1 since 2*934 - 1 = 2*457 + 953 with 457, 953, phi(457+1) - 1 = 227 and phi(457+1) + 1 = 229 all prime.
		

Crossrefs

Programs

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

A236568 Primes p with prime(p + 2) + 2 prime.

Original entry on oeis.org

3, 5, 11, 31, 41, 43, 47, 67, 79, 107, 199, 223, 251, 263, 311, 313, 461, 467, 499, 577, 599, 641, 727, 743, 797, 911, 919, 929, 1163, 1187, 1277, 1303, 1429, 1433, 1447, 1613, 1619, 1621, 1637, 1783, 1789, 1823, 1831, 1867, 1879, 1997, 2029, 2039, 2089, 2309
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

This sequence is interesting because of the conjecture in A236566.
Note that A236457 is a subsequence of the sequence.

Examples

			a(1) = 3 since prime(3 + 2) + 2 = 11 + 2 = 13 is prime, but prime (2 + 2) + 2 = 9 is not.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[Prime[n+2]+2]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[400]],PrimeQ[Prime[#+2]+2]&] (* Harvey P. Dale, Feb 13 2024 *)

A237253 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that phi(k) - 1, phi(k) + 1 and prime(prime(prime(m))) - 2 are all prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 05 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 7.
(ii) Any integer n > 22 can be written as k + m with k > 0 and m > 0 such that prime(k) + 2 and prime(prime(prime(m))) - 2 are both prime.
Note that either part of the conjecture implies the twin prime conjecture.

Examples

			 a(12) = 1 since 12 = 9 + 3 with phi(9) - 1 = 5, phi(9) + 1 = 7 and prime(prime(prime(3))) - 2 = prime(prime(5)) - 2 = prime(11) - 2 = 29 all prime.
a(103) = 1 since 103 = 73 + 30 with phi(73) - 1 = 71, phi(73) + 1 = 73 and prime(prime(prime(30))) - 2 = prime(prime(113)) - 2 = prime(617) - 2 = 4547 all prime.
		

Crossrefs

Programs

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

A236569 Least term p of A236568 with 2*n - p prime, or 0 if such a prime p does not exist.

Original entry on oeis.org

0, 0, 3, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 11, 3, 3, 5, 31, 3, 5, 3, 3, 5, 3, 5, 11, 3, 5, 31, 3, 3, 5, 31, 3, 5, 3, 3, 5, 43, 3, 5, 3, 5, 11, 3, 5, 43, 31, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 11, 43, 11, 43, 31, 3, 5, 3, 5, 11, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 29 2014

Keywords

Comments

The conjecture in A236566 implies that a(n) > 0 for all n > 2.

Examples

			a(3) = 3 since prime(3 + 2) + 2 = 11 + 2 = 13 and 2*3 - 3 = 3 are both prime, but prime(2 + 2) + 2 = 9 is not.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[Prime[m+2]+2]
    Do[Do[If[p[Prime[k]]&&PrimeQ[2n-Prime[k]],Print[n," ",Prime[k]];Goto[aa]],{k,1,PrimePi[2n-1]}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]

A236573 Number of ordered ways to write n = k + m (k > 0, m > 0) such that p = 2*k + phi(m) - 1, prime(p + 2) + 2 and 2*n - p are all prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 29 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 712.
This implies the conjecture in A236566.

Examples

			a(100) = 1 since 100 = 10 + 90 with 2*10 + phi(90) - 1 = 20 + 24 - 1 = 43, prime(43 + 2) + 2 = 197 + 2 = 199 and 2*100 - 43 = 157 all prime.
a(1727) = 1 since 1727 = 956 + 771 with 2*956 + phi(771) - 1 = 1912 + 512 - 1 = 2423, prime(2423 + 2) + 2 = 21599 + 2 = 21601 and 2*1727 - 2423 = 1031 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[Prime[n+2]+2]
    f[n_,k_]:=2k+EulerPhi[n-k]-1
    a[n_]:=Sum[If[p[f[n,k]]&&PrimeQ[2n-f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Showing 1-8 of 8 results.