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.
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
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}]
Comments