A219966 Number of ways to write n=p+q+(n mod 2)q with q<=n/2 and p, q, q+6 all prime.
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 3, 2, 2, 3, 2, 3, 3, 2, 1, 4, 3, 1, 4, 3, 1, 4, 2, 3, 3, 2, 2, 4, 3, 2, 4, 2, 2, 5, 3, 4, 5, 2, 1, 5, 3, 2, 4, 1, 1, 5, 4, 4, 4, 3, 2, 5, 3, 2, 4, 3, 4, 5, 3, 4, 6, 3, 3, 6, 3, 3, 8, 5, 2, 6, 3, 4, 6, 2, 2, 9, 5, 3, 5, 4, 2, 6, 4
Offset: 1
Keywords
Examples
a(19)=1 since 19=5+2*7 with 5, 7, 7+6 all prime. a(20)=1 since 20=13+7 with 13, 7, 7+6 all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
Programs
-
Mathematica
a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+6]==True&&PrimeQ[n-(1+Mod[n,2])Prime[k]]==True,1,0],{k,1,PrimePi[n/2]}] Do[Print[n," ",a[n]],{n,1,10000}]
Comments