A237127 Number of ways to write n = k + m (0 < k < m) with k and m terms of A072281.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 3, 2, 3, 2, 3, 3, 3, 2, 2, 4, 3, 3, 2, 2, 4, 3, 4, 3, 4, 4, 3, 3, 4, 5, 4, 1, 3, 3, 5, 4, 4, 4, 4, 5, 3, 4, 2, 4, 4, 4, 5, 2, 4, 1, 4, 4, 4, 4, 1, 3, 4, 4, 5, 5
Offset: 1
Keywords
Examples
a(13) = 1 since 13 = 5 + 8 with phi(5) - 1 = 3, phi(5) + 1 = 5, phi(8) - 1 = 3 and phi(8) + 1 = 5 all prime. a(60) = 1 since 60 = 18 + 42 with phi(18) - 1 = 5, phi(18) + 1 = 7, phi(42) - 1 = 11 and phi(42) + 1 = 13 all prime. a(84) = 1 since 84 = 7 + 77 with phi(7) - 1 = 5, phi(7) + 1 = 7, phi(77) - 1 = 59 and phi(77) + 1 = 61 all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1] a[n_]:=Sum[If[PQ[k]&&PQ[n-k],1,0],{k,1,(n-1)/2}] Table[a[n],{n,1,70}]
Comments