A230140 Number of ways to write n = x + y + z with 0 < x <= y <= z such that 6*x-1, 6*y-1, 6*z-1 are among those primes p (terms of A230138) with p + 2 and 2*p - 5 also prime.
0, 0, 1, 1, 2, 2, 3, 2, 3, 1, 2, 2, 2, 3, 3, 4, 2, 3, 2, 3, 3, 3, 4, 2, 5, 2, 6, 3, 6, 5, 4, 5, 3, 5, 5, 8, 7, 6, 5, 6, 5, 5, 7, 6, 8, 4, 6, 5, 6, 7, 9, 8, 8, 5, 7, 6, 8, 10, 6, 10, 4, 8, 6, 6, 10, 6, 9, 5, 6, 5, 7, 7, 9, 6, 7, 8, 5, 10, 6, 9, 6, 6, 7, 4, 7, 7, 9, 6, 5, 5, 4, 6, 5, 6, 5, 5, 6, 4, 6, 6
Offset: 1
Keywords
Examples
a(10) = 1 since 10 = 2 + 3 + 5, and the three numbers 6*2-1=11, 6*3-1=17 and 6*5-1=29 are terms of A230138.
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
SQ[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]&&PrimeQ[12n-7] a[n_]:=Sum[If[SQ[i]&&SQ[j]&&SQ[n-i-j],1,0],{i,1,n/3},{j,i,(n-i)/2}] Table[a[n],{n,1,100}]
-
PARI
ip(x)=isprime(6*x-1) && isprime(6*x+1) && isprime(12*x-7); a(n)=sum(x=1,n\3,sum(y=x,ip(x)*(n-x)\2,ip(y) && ip(n-x-y))) \\ - M. F. Hasler, Oct 10 2013
Comments