A231883 Number of ways to write n = x + y (x, y > 0) with x^2 + (n-2)*y^2 prime.
0, 0, 2, 2, 2, 2, 4, 1, 5, 2, 5, 1, 4, 4, 3, 1, 7, 2, 3, 3, 6, 7, 3, 2, 6, 2, 9, 3, 8, 3, 10, 3, 5, 8, 8, 4, 7, 5, 13, 4, 12, 6, 7, 6, 8, 10, 14, 4, 17, 9, 9, 6, 9, 5, 8, 5, 9, 7, 12, 10, 11, 7, 11, 8, 12, 4, 13, 3, 22, 6, 16, 7, 14, 8, 10, 4, 14, 4, 17, 9, 16, 6, 12, 11, 14, 4, 21, 4, 21, 8, 18, 3, 11, 14, 23, 7, 22, 5, 23, 8
Offset: 1
Keywords
Examples
a(8) = 1 since 8 = 5 + 3 with 5^2 + (8-2)*3^2 = 79 prime. a(12) = 1 since 12 = 11 + 1 with 11^2 + (12-2)*1^2 = 131 prime. a(16) = 1 since 16 = 15 + 1 with 15^2 + (16-2)*1^2 = 239 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.
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[x^2+(n-2)*(n-x)^2],1,0],{x,1,n-1}] Table[a[n],{n,1,100}]
Comments