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 15 results. Next

A236457 Primes p with q = p + 2 and prime(q) + 2 both prime.

Original entry on oeis.org

3, 5, 11, 41, 107, 311, 461, 599, 641, 1277, 1619, 1997, 2309, 2381, 2789, 3671, 4787, 5099, 6659, 6701, 6827, 7457, 7487, 8219, 8537, 8597, 9929, 10709, 11117, 12071, 12107, 12251, 13709, 17747, 18047, 18251, 18521, 22091, 22637, 23027
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236456, this sequence should have infinitely many terms.
See A236458 for a similar sequence.

Examples

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

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n+2]&&PrimeQ[Prime[n+2]+2]
    In[2]:= n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[2600]],AllTrue[{#+2,Prime[#+2]+2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 21 2021 *)
  • PARI
    s=[]; forprime(p=2, 24000, q=p+2; if(isprime(q) && isprime(prime(q)+2), s=concat(s, p))); s \\ Colin Barker, Jan 26 2014

A259487 Least positive integer m with prime(m)+2 and prime(prime(m))+2 both prime such that prime(m*n)+2 and prime(prime(m*n))+2 are both prime.

Original entry on oeis.org

2, 1860, 408, 25011, 51312, 37977, 695, 4071, 10970, 3621, 17671, 12005, 1230, 19494, 542, 577, 408, 2476, 584, 542, 469, 34229, 343, 24078, 3011, 25749, 20706, 24198, 2478, 3926, 1030, 1030, 13857, 3621, 343, 13380, 2476, 4922, 2476, 296, 19176, 29175, 34737, 13, 625, 2956, 408, 572, 7, 469, 15604, 9699, 26515, 2167, 5302, 9773, 54254, 1410, 4524, 4351
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 28 2015

Keywords

Comments

Conjecture: Any positive rational number r can be written as m/n with m and n terms of A259488.
This implies that there are infinitely many primes p with p+2 and prime(p)+2 both prime.
I have verified the conjecture for all those r = a/b with a,b = 1,...,400. - Zhi-Wei Sun, Jun 29 2015

Examples

			a(1) = 2 since prime(2)+2 = 3+2 = 5 and prime(prime(2))+2 = prime(3)+2 = 7 are both prime, but prime(1)+2 = 4 is composite.
a(49) = 7 since prime(7)+2 = 17+2 = 19, prime(prime(7))+2 = prime(17)+2 = 59+2 = 61, prime(49*7)+2 = 2309+2 = 2311 and prime(prime(49*7))+2 = prime(2309)+2 = 20441+2 = 20443 are all 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
    PQ[k_]:=PrimeQ[Prime[k]+2]&&PrimeQ[Prime[Prime[k]]+2]
    Do[k=0;Label[bb];k=k+1;If[PQ[k]&&PQ[n*k], Goto[aa], Goto[bb]];Label[aa];Print[n," ", k];Continue,{n,1,60}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 357.
This is much stronger than the twin prime conjecture. Actually it implies that there are infinitely many primes p such that {p, p + 2} and {prime(p+2), prime(p+2) + 2} are both twin prime pairs. See A236457 for such primes p.

Examples

			a(18) = 1 since 18 = 3 + 15 with phi(3) + phi(15)/4 - 1  = 3,  3 + 2 = 5 and prime(5) + 2 = 13 all prime.
a(50) = 1 since 50 = 16 + 34 with phi(16) + phi(34)/4 - 1 = 11, 11 + 2 = 13 and prime(13) + 2 = 43 all prime.
a(929) = 1 since 929 = 441 + 488 with phi(441) + phi(488)/4 - 1 = 252 + 60 - 1 = 311, 311 + 2 = 313 and prime(313) + 2 = 2083 all prime.
		

Crossrefs

Programs

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

A236464 Primes p with prime(p) + 2 and prime(p) + 6 both prime.

Original entry on oeis.org

3, 5, 7, 13, 43, 89, 313, 613, 643, 743, 1171, 1279, 1627, 1823, 1867, 1999, 2311, 2393, 2683, 2753, 2789, 3571, 4441, 4561, 5039, 5231, 5647, 5953, 6067, 6317, 6899, 8039, 8087, 8753, 8923, 9337, 9787, 9931, 10259, 10667
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236472, this sequence contains infinitely many terms, i.e., there are infinitely many prime triples of the form {prime(p), prime(p) + 2, prime(p) + 6} with p prime.
See A236462 for a similar sequence.

Examples

			a(1) = 3 since 3, prime(3) + 2 = 7 and prime(3) + 6 = 11 are all prime, but prime(2) + 6 = 9 is composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[Prime[n]+2]&&PrimeQ[Prime[n]+6]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]

A236467 Primes p with p + 2 and prime(p) - 2 both prime.

Original entry on oeis.org

3, 11, 29, 149, 179, 191, 269, 347, 431, 461, 617, 659, 1031, 1619, 1931, 3467, 3527, 4799, 6569, 6689, 7349, 7877, 9011, 9767, 11117, 12611, 13691, 13901, 14549, 16067, 16139, 16451, 16631, 17489, 17681, 18911, 20981, 22367, 23909, 24179
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236468, this sequence should have infinitely many terms.
See A236457 and A236458 for similar sequences.

Examples

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

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[n+2]&&PrimeQ[Prime[n]-2]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[3000]],AllTrue[{#+2,Prime[#]-2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 11 2020 *)

A236470 a(n) = |{0 < k < n: p = prime(k) + phi(n-k), p + 2 and prime(p) + 2 are all prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 2, 1, 2, 1, 1, 1, 1, 0, 2, 2, 2, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 1, 3, 0, 1, 1, 1, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 948.
We have verified this for n up to 50000.
The conjecture implies that there are infinitely many primes p with p + 2 and prime(p) + 2 both prime. See A236458 for such primes p.

Examples

			 a(12) = 1 since prime(5) + phi(7) = 11 + 6 = 17, 17 + 2 = 19 and prime(17) + 2 = 59 + 2 = 61 are all prime.
a(97) = 1 since prime(7) + phi(90) = 17 + 24 = 41, 41 + 2 = 43 and prime(41) + 2 = 179 + 2 = 181 are all prime.
		

Crossrefs

Programs

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

A259539 Numbers m with m-1, m+1 and prime(m)+2 all prime.

Original entry on oeis.org

60, 828, 858, 1032, 1050, 1230, 1320, 1878, 2028, 2340, 3252, 3390, 3462, 4548, 5502, 6870, 6948, 7590, 7878, 8010, 9438, 9720, 9858, 10038, 10068, 10302, 11490, 11718, 13932, 14388, 15138, 15270, 15288, 16068, 16188, 16230, 17208, 17292, 17838, 17910
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 30 2015

Keywords

Comments

Conjecture: The sequence contains infinitely many terms.
This is stronger than the Twin Prime Conjecture, and weaker than the conjecture in A259540.
Subsequence of A014574.

Examples

			a(1) = 60 since 60-1 = 59, 60+1 = 61 and prime(60)+2 = 283 are all 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
    n=0;Do[If[PrimeQ[k-1]&&PrimeQ[k+1]&&PrimeQ[Prime[k]+2],n=n+1;Print[n," ",k]],{k,1,18000}]
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprime(p+2) && isprime(prime(p+1)+2), print1(p+1, ", ")));} \\ Michel Marcus, Jun 30 2015

A236462 Primes p with prime(p) + 4 and prime(p) + 6 both prime.

Original entry on oeis.org

19, 59, 151, 181, 211, 229, 389, 571, 877, 983, 1039, 1259, 1549, 3023, 3121, 3191, 3259, 3517, 3719, 4099, 4261, 4463, 5237, 6947, 7529, 7591, 7927, 7933, 8317, 8389, 8971, 9403, 9619, 10163, 10939, 11131, 11717, 11743, 11839, 12301
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236460, this sequence should have infinitely many terms.
See A236464 for a similar sequence.

Examples

			a(1) = 19 with 19, prime(19) + 4 = 71 and prime(19) + 6 = 73 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[Prime[n]+4]&&PrimeQ[Prime[n]+6]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[1500]],AllTrue[Prime[#]+{4,6},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 21 2018 *)
  • PARI
    s=[]; forprime(p=2, 12500, if(isprime(prime(p)+4) && isprime(prime(p)+6), s=concat(s, p))); s \\ Colin Barker, Jan 26 2014

A236481 Primes p with p + 2, prime(p) + 2 and prime(prime(p)) + 2 all prime.

Original entry on oeis.org

3, 1949, 4217, 8219, 9929, 22091, 23537, 28097, 38711, 41609, 50051, 60899, 68111, 72227, 74159, 79631, 115151, 122399, 127679, 150959, 155537, 266687, 267611, 270551, 271499, 284741, 306347, 428297, 433661, 444287
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

Conjecture: For any positive integer m, there are infinitely many chains p(1) < p(2) < ... < p(m) of m primes with p(k) + 2 prime for all k = 1,...,m such that p(k + 1) = prime(p(k)) for every 0 < k < m.

Examples

			a(1) = 3 since 3, 3 + 2 = 5, prime(3) + 2 = 7 and prime(prime(3)) + 2 = prime(5) + 2 = 13 are all prime, but 2 + 2 = 4 is composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[n+2]&&PrimeQ[Prime[n]+2]&&PrimeQ[Prime[Prime[n]]+2]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10^6}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 211.
This implies that there are infinitely many primes p with {prime(p), prime(p) + 4, prime(p) + 6} a prime triple. See A236462 for such primes p.

Examples

			a(30) = 1 since 30 = 13 + 17 with phi(13) + phi(17)/2 - 1 = 19, prime(19) + 4 = 67 + 4 = 71 and prime(19) + 6 = 73 all prime.
a(831) = 1 since 831 = 66 + 765 with phi(66) + phi(765)/2 - 1 = 20 + 192 - 1 = 211, prime(211) + 4 = 1297 + 4 = 1301 and prime(211) + 6 = 1303 all prime.
		

Crossrefs

Programs

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