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.

A235919 a(n) = |{0 < k < n - 2: p = prime(k) + phi(n-k)/2, prime(p) - p + 1 and (p^2 - 1)/4 - prime(p) 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, 1, 0, 0, 3, 0, 1, 2, 3, 1, 0, 3, 3, 2, 1, 2, 1, 3, 2, 4, 2, 1, 6, 2, 6, 2, 3, 2, 3, 6, 2, 1, 7, 2, 5, 4, 3, 4, 3, 6, 4, 5, 4, 2, 1, 2, 8, 2, 4, 5, 5, 6, 4, 5, 4, 6, 3, 3, 5, 6, 5, 3, 4, 8, 2, 3, 7, 7, 8, 5, 5, 3, 3, 7, 9, 3, 8, 2, 4, 4, 4, 9, 2, 5, 8, 5, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 24.
This implies that there are infinitely many primes p with prime(p) - p + 1 and (p^2 - 1)/4 - prime(p) both prime.

Examples

			 a(30) = 1 since prime(6) + phi(24)/2 = 13 + 4 = 17, prime(17) - 16 = 59 - 16 = 43 and (17^2 - 1)/4 - prime(17) = 72 - 59 = 13 are all prime.
  a(35) = 1 since prime(19) + phi(16)/2 = 67 + 4 = 71, prime(71) - 70 = 353 - 70 = 283 and (71^2 - 1)/4 - prime(71) = 1260 - 353 = 907 are all prime.
		

Crossrefs

Programs

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