A236968 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that 6*k - 1, 6*k + 1 and k + phi(m) are all prime, where phi(.) is Euler's totient function.
0, 1, 2, 2, 1, 2, 2, 3, 3, 1, 4, 4, 3, 5, 3, 1, 1, 4, 5, 6, 3, 1, 4, 4, 3, 2, 2, 3, 3, 5, 3, 6, 5, 1, 6, 1, 4, 6, 4, 1, 6, 7, 8, 6, 2, 2, 5, 8, 4, 4, 3, 3, 7, 8, 3, 5, 3, 4, 6, 7, 8, 9, 5, 2, 3, 2, 4, 7, 5, 2, 2, 6, 6, 8, 5, 1, 6, 2, 6, 7, 3, 3, 8, 8, 6, 5, 2, 5, 6, 9, 9, 5, 4, 1, 7, 2, 3, 9, 6, 3
Offset: 1
Keywords
Examples
a(17) = 1 since 17 = 7 + 10 with 6*7 - 1 = 41, 6*7 + 1 = 43 and 7 + phi(10) = 7 + 4 = 11 all prime. a(486) = 1 since 486 = 325 + 161 with 6*325 - 1 = 1949, 6*325 + 1 = 1951 and 325 + phi(161) = 325 + 132 = 457 all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
p[n_,k_]:=PrimeQ[6k-1]&&PrimeQ[6k+1]&&PrimeQ[k+EulerPhi[n-k]] a[n_]:=Sum[If[p[n,k],1,0],{k,1,n-1}] Table[a[n],{n,1,100}]
Comments