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.

A235924 a(n) = |{0 < k < n: p = phi(k) + phi(n-k)/3 + 1, q = prime(p) - p + 1 and r = prime(q) - q + 1 are all prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 37.
This implies that there are infinitely many primes p with q = prime(p) - p + 1 and r = prime(q) - q + 1 both prime.

Examples

			a(20) = 1 since phi(6) + phi(14)/3 + 1 = 5, prime(5) - 4 = 11 - 4 = 7 and prime(7) - 6 = 17 - 6 = 11 are all prime.
a(77) = 1 since phi(59) + phi(18)/3 + 1 = 61, prime(61) - 60 = 283 - 60 = 223 and prime(223) - 222 = 1409 - 222 = 1187 are all prime.
a(1471) = 1 since phi(25) + phi(1446)/3 + 1 = 181, prime(181) - 180 = 1087 - 180 = 907 and prime(907) - 906 = 7057 - 906 = 6151 are all prime.
		

Crossrefs

Programs

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