OFFSET
1,3
COMMENTS
Conjecture: (i) a(n) > 0 for n > 0 with the only exception n = 15^2 = 225. Also, a(n) = 1 only for n = 1, 2, 4, 5, 6, 8, 11, 14, 15, 18, 20, 29, 36, 50, 53, 60, 62, 96, 117, 119, 218, 411, 540, 645, 1125, 1590, 2346, 4068.
(ii) Any positive integer can be written as p*(p-1)/2 + x*(x-1)/2 + P(y) with p prime and x and y integers, where the polynomial P(y) is either of the following ones: y*(y-1), y*(3*y+1)/2, y*(5*y+j)/2 (j = 1,3), y*(3*y+j) (j = 1,2), y*(7*y+3)/2, y*(9*y+j)/2 (j = 1,5,7), y*(5*y+j) (j = 1,3), y*(11*y+9)/2, 2*y*(3*y+j) (j = 1,2), y*(7*y+3).
(iii) Any positive integer can be written as p*(p-1)/2 + P(x,y) with p prime and x and y integers, where the polynomial P(x,y) is either of the following ones: a*x*(x-1)/2+y*(3*y+1)/2 (a = 2,3,4), x*(x-1)+y*(5*y+3)/2, b*x^2+y*(3*y+1)/2 (b = 1,2,3), x^2+y*(5*y+j)/2 (j = 1,3), x^2+y*(3*y+1), x^2+y*(7*y+j)/2 (j = 1,3,5), x^2+y*(4*y+1).
(iv) Every positive integer can be written as p*(p-1)/2+x*(3*x+1)/2+y*(3*y+1)/2 with p prime, x an nonnegative integer and y an integer. Also, for each r = 1,3, any positive integer n can be written as p*(p-1)/2+x*(3*x-1)/2+y*(5*y+r)/2, where p is a prime, and x and y are integers with x nonnegative.
Note that Gauss proved a classical assertion of Fermat which states that any natural number is the sum of three triangular numbers.
See also A270966 for a similar conjecture involving (p-1)^2 with p prime.
The conjecture that a(n) > 0 except for n = 225 appeared as Conjecture 1.2(i) of the author's JNT paper in the links.
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.
Zhi-Wei Sun, On x(ax+1)+y(by+1)+z(cz+1) and x(ax+b)+y(ay+c)+z(az+d), J. Number Theory 171(2017), 275-283.
EXAMPLE
a(1) = 1 since 1 = 1*(1-1)/2 + 1*(1-1)/2 + 2*(2-1)/2 with 2 prime.
a(4) = 1 since 4 = 1*(1-1)/2 + 2*(2-1)/2 + 3*(3-1)/2 with 2 and 3 prime.
a(29) = 1 since 29 = 1*(1-1)/2 + 2*(2-1)/2 + 8*(8-1)/2 with 2 prime.
a(50) = 1 since 50 = 2*(2-1)/2 + 7*(7-1)/2 + 8*(8-1)/2 with 2 and 7 prime.
a(119) = 1 since 119 = 8*(8-1)/2 + 9*(9-1)/2 + 11*(11-1)/2 with 11 prime.
a(411) = 1 since 411 = 16*(16-1)/2 + 16*(16-1)/2 + 19*(19-1)/2 with 19 prime.
a(1125) = 1 since 1125 = 3*(3-1)/2 + 34*(34-1)/2 + 34*(34-1)/2 with 3 prime.
a(1590) = 1 since 1590 = 7*(7-1)/2 + 37*(37-1)/2 + 43*(43-1)/2 with 7, 37 and 43 prime.
a(2346) = 1 since 2346 = 6*(6-1)/2 + 16*(16-1)/2 + 67*(67-1)/2 with 67 prime.
a(4068) = 1 since 4068 = 7*(7-1)/2 + 34*(34-1)/2 + 84*(84-1)/2 with 7 prime.
MATHEMATICA
TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]]
Do[r=0; Do[If[TQ[n-x(x-1)/2-y(y-1)/2]&&(PrimeQ[x]||PrimeQ[y]||PrimeQ[(Sqrt[8(n-x(x-1)/2-y(y-1)/2)+1]+1)/2]), r=r+1], {x, 1, (Sqrt[8n/3+1]+1)/2}, {y, x, (Sqrt[8(n-x(x-1)/2)/2+1]+1)/2}]; Print[n, " ", r]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 26 2016
STATUS
approved