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