A212295 Number of ways to represent n as the sum of (zero or more) twin primes.
1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 7, 6, 8, 9, 8, 14, 12, 18, 18, 19, 26, 24, 36, 35, 42, 49, 49, 68, 67, 86, 93, 100, 127, 126, 167, 172, 200, 235, 240, 313, 316, 389, 429, 464, 573, 584, 732, 778, 888, 1038, 1089, 1347, 1412, 1671, 1873, 2035, 2449, 2567, 3093
Offset: 0
Keywords
Crossrefs
Cf. A212294.
Programs
-
PARI
a(n,t=n)=if(n<3,!n,my(s=n%3==0); forprime(p=5,min(t,n), if(isprime(p+2), s+=a(n-p,p)+a(n-p-2,p+2))); s)