A235061 Number of ways to write n = k*(k+1)/2 + m with k > 0 and m > 0 such that prime(k*(k+1)/2) + phi(m) is prime, where phi(.) is Euler's totient function.
0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 3, 2, 2, 1, 1, 1, 2, 3, 3, 2, 1, 1, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 4, 2, 4, 4, 2, 3, 1, 4, 4, 1, 4, 3, 3, 3, 4, 5, 4, 3, 1, 3, 3, 5, 4, 4, 5, 1, 5, 3, 5, 5, 4, 2, 2, 5, 4, 5, 1, 1, 6, 5, 6, 6, 4, 5, 5, 8, 5, 2, 1, 4, 6, 4, 6, 7, 3, 3, 6, 4, 7, 5, 2, 7, 6
Offset: 1
Keywords
Examples
a(10) = 1 since 10 = 2*(2+1)/2 + 7 = 3 + 7 with prime(3) + phi(7) = 5 + 6 = 11 prime. a(20) = 1 since 20 = 3*(3+1)/2 + 14 = 6 + 14 with prime(6) + phi(14) = 13 + 6 = 19 prime. a(86) = 1 since 86 = 12*(12+1)/2 + 8 = 78 + 8 with prime(78) + phi(8) = 397 + 4 = 401 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[Prime[k(k+1)/2]+EulerPhi[n-k(k+1)/2]],1,0],{k,1,(Sqrt[8n-7]-1)/2}];Table[a[n],{n,1,100}]
Comments