A234615 Number of ways to write n = k + m with k > 0 and m > 0 such that p = prime(k) + phi(m) and q(p) - 1 are both prime, where phi(.) is Euler's totient function and q(.) is the strict partition function (A000009).
0, 0, 0, 0, 1, 1, 0, 2, 2, 2, 4, 3, 5, 4, 2, 6, 6, 6, 5, 4, 5, 6, 4, 6, 5, 5, 2, 4, 5, 6, 5, 7, 4, 6, 6, 8, 3, 3, 6, 7, 7, 4, 4, 4, 4, 7, 7, 3, 3, 4, 4, 6, 5, 4, 5, 5, 7, 1, 3, 4, 7, 5, 5, 6, 3, 7, 11, 5, 4, 5, 4, 7, 6, 4, 2, 7, 9, 7, 5, 5, 6, 5, 10, 7, 4, 3, 4, 6, 3, 4, 9, 5, 3, 5, 6, 5, 3, 6, 2, 7
Offset: 1
Keywords
Examples
a(6) = 1 since 6 = 2 + 4 with prime(2) + phi(4) = 5 and q(5) - 1 = 2 both prime. a(58) = 1 since 58 = 12 + 46 with prime(12) + phi(46) = 59 and q(59) - 1 = 9791 both prime. a(526) = 1 since 526 = 389 + 137 with prime(389) + phi(137) = 2819 and q(2819) - 1 = 326033386646595458662191828888146112979 both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..8000
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
Crossrefs
Programs
-
Mathematica
f[n_,k_]:=Prime[k]+EulerPhi[n-k] q[n_,k_]:=PrimeQ[f[n,k]]&&PrimeQ[PartitionsQ[f[n,k]]-1] a[n_]:=Sum[If[q[n,k],1,0],{k,1,n-1}] Table[a[n],{n,1,100}]
Comments