A232443 Number of ways to write n = p + q - pi(q), where p and q are odd primes, and pi(q) is the number of primes not exceeding q.
0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 3, 4, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 2, 2, 5, 4, 5, 5, 3, 3, 4, 4, 4, 5, 4, 2, 6, 5, 5, 5, 3, 4, 8, 5, 5, 6, 2, 4, 7, 6, 6, 5, 3, 5, 7, 6, 7, 6, 4, 6, 6, 5, 7, 5, 6, 6, 7, 7, 7, 6, 4, 5, 7, 8, 8, 7, 7, 7, 7, 8, 9, 5, 6, 9, 9, 7, 6, 7, 6, 7, 8, 3, 8, 9, 5
Offset: 1
Keywords
Examples
a(4) = 1 since 4 = 3 + 3 - pi(3) with 3 prime. a(5) = 1 since 5 = 3 + 5 - pi(5) with 3 and 5 prime. a(6) = 2 since 6 = 3 + 7 - pi(7) = 5 + 3 - pi(3) with 3, 5, 7 all prime. a(7) = 1 since 7 = 5 + 5 - pi(5) with 5 prime. a(11) = 1 since 11 = 5 + 11 - pi(11) with 5 and 11 both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, preprint, arXiv:1211.1588.
Programs
-
Mathematica
PQ[n_]:=PQ[n]=n>2&&PrimeQ[n] a[n_]:=Sum[If[PQ[n-Prime[k]+k],1,0],{k,2,PrimePi[2n-2]}] Table[a[n],{n,1,100}]
Comments