A227908 Number of ways to write 2*n = p + q with p, q and (p-1)^2 + q^2 all prime.
0, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 2, 2, 0, 2, 6, 1, 3, 5, 2, 3, 2, 1, 2, 2, 5, 4, 3, 2, 3, 8, 1, 4, 3, 3, 2, 5, 1, 2, 4, 5, 3, 4, 4, 2, 6, 1, 4, 5, 3, 3, 6, 2, 6, 5, 4, 5, 7, 3, 1, 9, 2, 3, 6, 1, 2, 5, 4, 7, 2, 7, 6, 6, 2, 4, 10, 3, 3, 6, 1, 7, 9, 5, 4, 5, 4, 3, 5, 3, 5, 8, 4, 4, 5, 2, 11, 9, 4
Offset: 1
Keywords
Examples
a(7) = 1 since 2*7 = 11 + 3, and (11-1)^2 + 3^2 = 109 is prime. a(19) = 1 since 2*19 = 7 + 31, and (7-1)^2 + 31^2 = 997 is 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 [math.NT], 2012-2017.
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[2n-Prime[i]]&&PrimeQ[(Prime[i]-1)^2+(2n-Prime[i])^2],1,0],{i,1,PrimePi[2n-2]}] Table[a[n],{n,1,100}]
Comments