A228425 Number of ways to write n = x + y (x, y > 0) with x*(x+1)/2 + y^2 prime.
0, 1, 1, 2, 2, 1, 3, 2, 2, 3, 2, 4, 4, 2, 2, 3, 6, 1, 5, 2, 3, 4, 3, 5, 1, 6, 4, 5, 2, 5, 8, 5, 6, 5, 3, 6, 10, 5, 5, 9, 8, 6, 13, 3, 5, 12, 9, 6, 4, 6, 7, 18, 5, 7, 4, 7, 14, 6, 11, 7, 16, 6, 7, 13, 6, 9, 13, 8, 6, 11, 7, 15, 14, 6, 11, 11, 6, 15, 12, 9, 6, 20, 9, 5, 20, 9, 8, 14, 15, 8, 9, 18, 7, 15, 6, 16, 17, 9, 10, 7
Offset: 1
Keywords
Examples
a(6) = 1 since 6 = 2 + 4 with 2*3/2 + 4^2 = 19 prime. a(18) = 1 since 18 = 7 + 11 with 7*8/2 + 11^2 = 149 prime. a(25) = 1 since 25 = 1 + 24 with 1*2/2 + 24^2 = 577 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(x+1)/2+(n-x)^2],1,0],{x,1,n-1}] Table[a[n],{n,1,100}]
Comments