A230502 Number of ways to write n = (2-(n mod 2))*p + q + r with p <= q <= r such that p, q, r, p^2 - 2, q^2 - 2, r^2 - 2 are all prime.
0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 2, 2, 4, 3, 4, 2, 2, 3, 2, 2, 4, 2, 3, 4, 4, 3, 3, 3, 3, 4, 5, 4, 4, 3, 3, 5, 7, 5, 6, 5, 5, 5, 6, 3, 5, 5, 5, 5, 6, 4, 4, 4, 5, 6, 7, 5, 6, 4, 3, 5, 7, 5, 5, 7, 7, 6, 7, 4, 6, 6, 7, 7, 6, 4, 6, 4, 4, 8, 8, 6, 6, 7, 6, 6, 10
Offset: 1
Keywords
Examples
a(10) = 1 since 10 = 2*2 + 3 + 3 with 2, 3, 2^2 - 2 = 2, 3^2 - 2 = 7 all prime. a(19) = 2 since 19 = 3 + 3 + 13 = 5 + 7 + 7 with 3, 13, 5, 7, 3^2 - 2 = 7, 13^2 - 2 = 167, 5^2 - 2 = 23, 7^2 - 2 = 47 all 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 [math.NT], 2012-2017.
Programs
-
Mathematica
pp[n_]:=PrimeQ[n^2-2] pq[n_]:=PrimeQ[n]&&pp[n] a[n_]:=Sum[If[pp[Prime[i]]&&pp[Prime[j]]&&pq[n-(2-Mod[n,2])Prime[i]-Prime[j]],1,0],{i,1,PrimePi[n/(4-Mod[n,2])]},{j,i,PrimePi[(n-(2-Mod[n,2])Prime[i])/2]}] Table[a[n],{n,1,100}]
Comments