OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 49, 608.
(ii) Let T(x) = x*(x+1)/2 and pen(x) = x*(3x+1)/2. Any positive integer can be written as (p-1)^2+P(x,y) with p prime and x and y integral, where the polynomial P(x,y) is either of the following ones: T(x)+2*pen(y), 2*T(x)+pen(y), T(x)+y*(5y+1)/2, T(x)+y*(9y+5)/2, pen(x)+y*(5y+j)/2 (j = 1,3), pen(x)+y*(7y+k)/2 (k = 3,5), pen(x)+y*(4y+j) (j = 1,3), pen(x)+y*(5y+r) (r = 1,2,3,4), pen(x)+2y*(3y+i) (i = 1,2), pen(x)+6*pen(y), x*(5x+1)/2+y*(3y+2), x*(5x+1)/2+y*(9y+7)/2, x*(5x+3)/2+y*(3y+i) (i = 1,2), x*(5x+3)/2+y*(9y+5)/2.
See also A270928 for a similar conjecture involving T(p-1) = p*(p-1)/2 with p prime.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113.
Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
EXAMPLE
a(1) = 1 since 1 = 0^2 + (2-1)^2 + 0*(3*0+1)/2 with 2 prime.
a(12) = 2 since 12 = (2-1)^2 + 2^2 + 2*(2*3+1)/2 = (2-1)^2 + 3^2 + 1*(3*1+1)/2 with 2 prime.
a(49) = 1 since 49 = (2-1)^2 + 6^2 + (-3)*(3*(-3)+1)/2 with 2 prime.
a(608) = 1 since 608 = (7-1)^2 + 14^2 + (-16)*(3*(-16)+1)/2 with 7 prime.
MATHEMATICA
pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
Do[r=0; Do[If[(PrimeQ[x+1]||PrimeQ[y+1])&&pQ[n-x^2-y^2], r=r+1], {x, 0, Sqrt[n/2]}, {y, x, Sqrt[n-x^2]}]; Print[n, " ", r]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 27 2016
STATUS
approved