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

A237413 Number of ways to write n = k + m with k > 0 and m > 0 such that p(k)^2 - 2, p(m)^2 - 2 and p(p(m))^2 - 2 are all prime, where p(j) denotes the j-th prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 07 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This conjecture was motivated by the "Super Twin Prime Conjecture".
See A237414 for primes q with q^2 - 2 and p(q)^2 - 2 both prime.

Examples

			a(7) = 1 since 7 = 6 + 1 with p(6)^2 - 2 = 13^2 - 2 = 167, p(1)^2 - 2 = 2^2 - 2 = 2 and p(p(1))^2 - 2 = p(2)^2 - 2 = 3^2 - 2 = 7 are all prime.
a(516) = 1 since 516 = 473 + 43 with p(473)^2 - 2 = 3359^2 - 2 = 11282879, p(43)^2 - 2 = 191^2 - 2 = 36479 and p(p(43))^2 - 2 = p(191)^2 - 2 = 1153^2 - 2 = 1329407 all prime.
		

Crossrefs

Programs

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

A238573 a(n) = |{0 < k <= n: prime(k*n) + 2 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 6, and a(n) = 1 only for n = 2, 3, 8, 11, 17. Moreover, for any n > 0 there exists a positive integer k < 3*sqrt(n) + 6 such that prime(k*n) + 2 is prime.
(ii) For any integer n > 6, prime(k^2*n) + 2 is prime for some k = 1, ..., n.
(iii) If n > 5, then prime(k^2*(n-k)) + 2 is prime for some 0 < k < n.
Clearly, each of the three parts implies the twin prime conjecture.
We have verified part (i) of the conjecture for n up to 2*10^6.

Examples

			a(2) = 1 since prime(1*2) + 2 = 3 + 2 = 5 is prime.
a(3) = 1 since prime(1*3) + 2 = 5 + 2 = 7 is prime.
a(8) = 1 since prime(8*8) + 2 = 311 + 2 = 313 is prime.
a(11) = 1 since prime(3*11) + 2 = 137 + 2 = 139 is prime.
a(17) = 1 since prime(1*17) + 2 = 59 + 2 = 61 is prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: For each d = 1, 2, 3, ... there is a positive integer N(d) for which any integer n > N(d) can be written as k + m with k > 0 and m > 0 such that prime(k) + 2*d and prime(prime(m)) + 2*d are both prime. In particular, we may take (N(1), N(2), ..., N(10)) = (2, 11, 4, 15, 31, 4, 2, 77, 4, 7).
This extension of the "Super Twin Prime Conjecture" (posed by the author) implies de Polignac's well-known conjecture that any positive even number can be a difference of two primes infinitely often.

Examples

			a(7) = 1 since 7 = 6 + 1 with prime(6) + 4 = 13 + 4 = 17 and prime(prime(1)) + 4 = prime(2) + 4 = 7 both prime.
a(114) = 1 since 114 = 78 + 36 with prime(78) + 4 = 397 + 4 = 401 and prime(prime(36)) + 4 = prime(151) + 4 = 877 + 4 = 881 both prime.
		

Crossrefs

Programs

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

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}]

A237259 Least positive integer k < n such that prime(k) + 2 and prime(prime(n-k)) + 2 are both prime, or 0 if such a number k does not exist.

Original entry on oeis.org

0, 0, 2, 2, 2, 2, 3, 2, 2, 3, 5, 5, 7, 7, 2, 2, 3, 5, 5, 7, 7, 20, 10, 10, 2, 2, 3, 5, 5, 7, 2, 2, 3, 5, 5, 7, 7, 35, 10, 10, 17, 2, 3, 20, 5, 17, 7, 35, 20, 10, 28, 28, 13, 41, 26, 26, 17, 28, 35, 20, 2, 3, 33, 5, 2, 3, 2, 3, 10, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 05 2014

Keywords

Comments

Conjecture: a(n) < 2*sqrt(n)*log(3*n) for all n > 0.
We have verified this for n up to 5*10^5. Note that a(202) = 173 > 2*sqrt(202)*log(2*202).
According to the conjecture in A218829, a(n) should be positive for all n > 2.

Examples

			a(3) = 2 since prime(2) + 2 = 5 and prime(prime(3-2)) + 2 = prime(2) + 2 = 5 are both prime, but prime(1) + 2 = 4 is composite.
		

Crossrefs

Programs

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

A237260 Least positive integer m < n with prime(prime(m)) + 2 and prime(n-m) + 2 both prime, or 0 if such a number m does not exist.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 23, 6, 1, 2, 1, 2, 3, 4, 7, 1, 2, 1, 2, 3, 4, 7, 6, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 14, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 24, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 05 2014

Keywords

Comments

Conjecture: a(n) < sqrt(6*n)*log(3*n) for all n > 0.
We have verified this for n up to 5*10^5. Note that a(273) = 271 > sqrt(6*273)*log(2*273).
According to the conjecture in A218829, a(n) should be positive for all n > 2.

Examples

			a(5) = 2 since prime(prime(2)) + 2 = prime(3) + 2 = 7 and prime(5-2) + 2 = 7 are both prime, but prime(5-1) + 2 = 7 + 2 = 9 is composite.
		

Crossrefs

Programs

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

A237283 Primes p with prime(prime(p)) + 2 also prime.

Original entry on oeis.org

2, 3, 7, 13, 23, 29, 59, 71, 103, 193, 257, 271, 281, 311, 317, 389, 433, 439, 463, 569, 577, 619, 673, 683, 691, 797, 811, 857, 859, 887, 1031, 1069, 1109, 1129, 1153, 1229, 1307, 1597, 1613, 1867, 1949, 1951, 2069, 2297, 2477, 2551, 2621, 2657, 2699, 2753
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 05 2014

Keywords

Comments

This sequence is interesting because of the conjecture in A237253.
A236481, A236482 and A236484 are subsequences of the sequence.

Examples

			a(1) = 2 since 2 and prime(prime(2)) + 2 = prime(3) + 2 = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    n=0;Do[If[PrimeQ[Prime[Prime[Prime[k]]]+2],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]
    Select[Prime[Range[500]],PrimeQ[Prime[Prime[#]]+2]&] (* Harvey P. Dale, May 30 2018 *)

A237367 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that 2*k - 1, prime(k)^2 - 2 and prime(m)^2 - 2 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 07 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 73, 81, 534.
(ii) Any integer n > 2 can be written as k + m with k > 0 and m > 0 such that 2*k - 1, prime(k) + k*(k-1) and prime(m) + m*(m-1) are all prime.
(iii) Every n = 9, 10, ... can be written as k + m with k > 0 and m > 0 such that 6*k - 1, prime(k) + 2*k and prime(m) + 2*m are all prime.
Clearly, part (i) of this conjecture implies that there are infinitely many primes p with p^2 - 2 also prime. Similar comments apply to parts (ii) and (iii).

Examples

			a(3) = 1 since 3 = 2 + 1 with 2*2 - 1 = 3, prime(2)^2 - 2 = 3^2 - 2 = 7 and prime(1)^2 - 2 = 2^2 - 2 = 2 all prime.
a(73) = 1 since 73 = 55 + 18 with 2*55 - 1 = 109, prime(55)^2 - 2 = 257^2 - 2 = 66047 and prime(18)^2 - 2 = 61^2 - 2 = 3719 all prime.
a(81) = 1 since 81 = 34 + 47 with 2*34 - 1 = 67, prime(34)^2 - 2 = 139^2 - 2 = 19319 and prime(47)^2 - 2 = 211^2 - 2 = 44519 all prime.
a(534) = 1 since 534 = 100 + 434 with 2*100 - 1 = 199, prime(100)^2 - 2 = 541^2 - 2 = 292679 and prime(434)^2 - 2 = 3023^2 - 2 = 9138527 all prime.
		

Crossrefs

Programs

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

A238756 Number of ordered ways to write n = k + m (k > 0 and m > 0) such that 2*k + 1, prime(prime(k)) - prime(k) + 1 and prime(prime(m)) - prime(m) + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have verified this for n up to 10^7.
The conjecture suggests that there are infinitely many primes p with 2*pi(p) + 1 and prime(p) - p + 1 both prime.

Examples

			a(6) = 2 since 6 = 2 + 4 with 2*2 + 1 = 5, prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 3 and prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 all prime, and 6 = 3 + 3 with 2*3 + 1 = 7 and prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 both prime.
		

Crossrefs

Programs

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

A261295 Least positive integer k such that both k and k*n belong to the set {m>0: prime(m) = prime(p)+2 for some prime p}.

Original entry on oeis.org

3, 3, 6, 578, 18, 3, 6, 90, 1868, 374, 4, 674, 278, 3, 6, 114, 3534, 110, 6, 354, 4, 14, 28464, 2790, 84, 4452, 2802, 3, 6, 3, 90, 2820, 354, 110, 4080, 278, 44, 3, 2712, 18, 3012, 90, 14, 12672, 44, 14, 1572, 1124, 720, 42, 114, 44, 84, 2790, 42, 90, 42, 3, 6, 84, 44, 1572, 3068, 1742, 2394, 174, 110, 744, 3020, 578
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 14 2015

Keywords

Comments

Conjecture: (i) Any positive rational number r can be written as m/n with m and n in the set S = {k>0: prime(k) = prime(p)+2 for some prime p} = {p+1: p and prime(p)+2 are both prime}.
(ii) Any positive rational number r can be written as m/n with m and n in the set T = {k>0: prime(k) = prime(p)-2 for some prime p} = {p-1: p and prime(p)-2 are both prime}.
(iii) Any positive rational number r not equal to 1 can be written as m/n with m in S and n in T, where the sets S and T are given in parts (i) and (ii).
For example, 4/5 = 15648/19560 with 15647, prime(15647)+2 = 171763, 19559 and prime(19559)+2 = 219409 all prime; and 4/5 = 67536/84420 with 67537, prime(67537)-2 = 848849, 84421 and prime(84421)-2 = 1081937 all prime. Also, 4/5 = 8/10 with 7, prime(7)+2 = 19, 11 and prime(11)-2 = 29 all prime; and 5/4 = 8220/6576 with 8221, prime(8221)+2 = 84349, 6577 and prime(6577)-2 = 65837 all prime.

Examples

			a(3) = 6 since prime(6) = 13 = prime(5)+2 with 5 prime, and prime(6*3) = 61 = prime(17)+2 with 17 prime.
a(4) = 578 since prime(578) = 4219 = prime(577)+2 with 577 prime, and prime(578*4) = 20479 = prime(2311)+2 with 2311 prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]
    PQ[n_]:=PrimeQ[n]&&PrimeQ[PrimePi[n]]
    Do[k=0;Label[bb];k=k+1;If[PQ[f[k]-2]&&PQ[f[k*n]-2],Goto[aa],Goto[bb]];Label[aa];Print[n," ", k];Continue,{n,1,70}]
Showing 1-10 of 10 results.