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.

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

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

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

A237183 Primes p with phi(p+1) - 1 and phi(p+1) + 1 both prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

7, 11, 13, 17, 37, 41, 53, 61, 97, 151, 181, 197, 227, 233, 251, 269, 277, 397, 433, 457, 487, 541, 557, 571, 593, 619, 631, 719, 743, 769, 839, 857, 929, 941, 947, 953, 1013, 1021, 1049, 1061, 1063, 1201, 1237, 1277, 1307, 1321, 1367, 1481, 1511, 1549
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

According to part (i) of the conjecture in A237168, this sequence should have infinitely many terms.

Examples

			a(1) = 7 since 7, phi(7+1) - 1 = 3 and phi(7+1) + 1 = 5 are all prime, but phi(2+1) - 1 = phi(3+1) - 1 = phi(5+1) - 1 = 1 is not prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1]
    n=0;Do[If[PQ[Prime[k]+1],n=n+1;Print[n," ",Prime[k]]],{k,1,10000}]
    Select[Prime[Range[300]],And@@PrimeQ[EulerPhi[#+1]+{1,-1}]&] (* Harvey P. Dale, Mar 06 2014 *)
  • PARI
    s=[]; forprime(p=2, 2000, if(isprime(eulerphi(p+1)-1) && isprime(eulerphi(p+1)+1), s=concat(s, p))); s \\ Colin Barker, Feb 04 2014

A237184 Number of ordered ways to write n = (1+(n mod 2))*p + q with p, q, phi(p+1) - 1 and phi(q-1) + 1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 23.
This is stronger than Goldbach's conjecture and Lemoine's conjecture (cf. A046927).
We have verified the conjecture for n up to 3*10^6.

Examples

			a(10) = 1 since 10 = 7 + 3 with 7, 3, phi(7+1) - 1 = 3 and phi(3-1) + 1 = 2 all prime.
a(499) = 1 since 499 = 2*199 + 101 with 199, 101, phi(199+1) - 1 = 79 and phi(101-1) + 1 = 41 all prime.
a(869) = 1 since 869 = 2*433 + 3 with 433, 3, phi(433+1) - 1 = 179 and phi(3-1) + 1 = 2 all prime.
		

Crossrefs

Programs

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

A237531 a(n) = |{0 < k < n/2: phi(k*(n-k)) - 1 and phi(k*(n-k)) + 1 are both prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
Clearly, this implies the twin prime conjecture.

Examples

			a(12) = 1 since 12 = 3 + 9 with phi(3*9) - 1 = 17 and phi(3*9) + 1 = 19 both prime.
a(19) = 1 since 19 = 1 + 18 with phi(1*18) - 1 = 5 and phi(1*18) + 1 = 7 both prime.
a(86) = 1 since 86 = 8 + 78 with phi(8*78) - 1 = 191 and phi(8*78) + 1 = 193 both prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1]
    a[n_]:=Sum[If[p[k(n-k)],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,80}]
Showing 1-7 of 7 results.