OFFSET
1,9
COMMENTS
Conjecture: (i) a(n) > 0 except for n = 1, 2, 4, 5, 7, 12. Moreover, for each n = 20, 21, ... there are three distinct positive integers x, y and z with x + y + z = n such that x*(x+1)/2 + y*(y+1)/2 + z*(z+1)/2 is a triangular number.
(ii) A positive integer n cannot be written as x + y + z (x, y, z > 0) with x^2 + y^2 + z^2 a square if and only if n has the form 2^r*3^s or the form 2^r*7, where r and s are nonnegative integers.
(iii) Any integer n > 14 can be written as a + b + c + d, where a, b, c, d are positive integers with a^2 + b^2 + c^2 + d^2 a square. If n > 20 is not among 22, 28, 30, 38, 44, 60, then we may require additionally that a, b, c, d are pairwise distinct.
(iv) For each integer n > 50 not equal to 71, there are positive integers a, b, c, d with a + b + c + d = n such that both a^2 + b^2 and c^2 + d^2 are squares.
Part (ii) and the first assertion in part (iii) were confirmed by Chao Huang and Zhi-Wei Sun in 2021. - Zhi-Wei Sun, May 09 2021
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..3000
Chao Huang and Zhi-Wei Sun, On partitions of integers with restrictions involving squares, arXiv:2105.03416 [math.NT], 2021.
Zhi-Wei Sun, Diophantine problems involving triangular numbers and squares, a message to Number Theory List, Oct. 11, 2013.
EXAMPLE
a(16) = 1 since 16 = 3 + 6 + 7 and 3*4/2 + 6*7/2 + 7*8/2 = 55 = 10*11/2.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
T[n_]:=n(n+1)/2
a[n_]:=Sum[If[SQ[8(T[i]+T[j]+T[n-i-j])+1], 1, 0], {i, 1, n/3}, {j, i, (n-i)/2}]
Table[a[n], {n, 1, 100}]
PROG
(PARI) a(n)=my(t=(n+1)*n/2, s); sum(x=1, n\3, s=t-n--*x; sum(y=x, n\2, is_A000217(s-(n-y)*y))) \\ - M. F. Hasler, Oct 11 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 10 2013
STATUS
approved