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

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 *)

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

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

Conjecture: a(n) > 0 for every n = 330, 331, ....
We have verified this for n up to 80000.
The conjecture implies that there are infinitely many prime triples of the form {prime(p), prime(p) + 2, prime(p) + 6} with p prime. See A236464 for such primes p.

Examples

			a(10) = 1 since prime(2) + phi(8) = 3 + 4 = 7, prime(7) + 2 = 17 + 2 = 19 and prime(7) + 6 = 23 are all prime.
a(877) = 1 since prime(784) + phi(877-784) = 6007 + 60 = 6067, prime(6067) + 2 = 60101 + 2 = 60103 and prime(6067) + 6 = 60107 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]+2]&&PrimeQ[Prime[n]+6]
    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}]

A236508 a(n) = |{0 < k < n-2: p = 2*phi(k) + phi(n-k)/2 - 1, p + 2, p + 6 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, 1, 1, 0, 2, 1, 1, 2, 1, 3, 2, 2, 0, 2, 3, 1, 2, 1, 3, 3, 2, 2, 1, 1, 1, 3, 0, 2, 3, 2, 1, 3, 0, 2, 0, 1, 1, 1, 1, 2, 0, 0, 0, 0, 2, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 146.
We have verified this for n up to 52000.
The conjecture implies that there are infinitely many prime triples {p, p + 2, p + 6} with {prime(p), prime(p) + 6} a sexy prime pair. See A236509 for such primes p.

Examples

			a(13) = 1 since 2*phi(3) + phi(10)/2 - 1 = 5, 5 + 2 = 7, 5 + 6 = 11 and prime(5) + 6 = 11 + 6 = 17 are all prime.
a(244) = 1 since 2*phi(153) + phi(244-153)/2 - 1 = 2*96 + 72/2 - 1 = 227, 227 + 2 = 229, 227 + 6 = 233 and prime(227) + 6 = 1433 + 6 = 1439 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[n+2]&&PrimeQ[n+6]&&PrimeQ[Prime[n]+6]
    f[n_,k_]:=2*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}]

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

Original entry on oeis.org

5, 11, 107, 227, 311, 347, 821, 857, 1091, 1607, 1997, 2657, 3527, 4931, 5231, 8087, 8231, 9431, 10331, 11171, 12917, 13691, 13877, 21377, 22271, 24917, 27737, 29567, 32057, 33347, 35591, 36467, 37307, 39227, 42017
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 27 2014

Keywords

Comments

According to the conjecture in A236508, this sequence should have infinitely many terms.

Examples

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

Crossrefs

Programs

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

A236552 a(n) = |{0 < k < n: 6*k - 1, 6*k + 1, 6*k + 5 and prime(n-k) + 6 are all prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 4, there is a positive integer k < n such that 6*k - 5, 6*k - 1, 6*k + 1 and prime(n-k) + 6 are all prime.
(iii) Any integer n > 7 can be written as p + q with q > 0 such that p, p + 6 and prime(q) + 6 are all prime.
(iv) Each integer n > 4 can be written as k*(k+1) + m with k > 0 and m > 0 such that prime(m) + 6 is prime.

Examples

			a(4) = 1 since 6*1 - 1, 6*1 + 1, 6*1 + 5 and prime(4-1) + 6 = 11 are all prime.
a(48) = 1 since 6*32 - 1 = 191, 6*32 + 1 = 193, 6*32 + 5 = 197 and prime(48-32) + 6 = 53 + 6 = 59 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]&&PrimeQ[6n+5]
    q[n_]:=PrimeQ[Prime[n]+6]
    a[n_]:=Sum[If[p[k]&&q[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Showing 1-7 of 7 results.