

A230121


Number of ways to write n = x + y + z (0 < x <= y <= z) such that x*(x+1)/2 + y*(y+1)/2 + z*(z+1)/2 is a triangular number.


7



0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 1, 0, 2, 1, 2, 1, 2, 3, 2, 2, 6, 1, 3, 5, 1, 2, 3, 5, 2, 1, 3, 3, 3, 4, 3, 8, 2, 5, 11, 2, 5, 8, 4, 6, 4, 9, 4, 6, 5, 4, 6, 3, 8, 8, 5, 8, 10, 7, 7, 11, 8, 6, 7, 8, 5, 9, 7, 6, 8, 7, 7, 8, 13, 9, 11, 10, 7, 22, 9, 10, 13, 3, 6, 10, 8, 17, 12, 7, 9, 10, 16, 6, 18, 18, 10, 15, 9, 12, 20, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)



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.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..3000
ZhiWei 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[nij])+1], 1, 0], {i, 1, n/3}, {j, i, (ni)/2}]
Table[a[n], {n, 1, 100}]


PROG

(PARI) a(n)=my(t=(n+1)*n/2, s); sum(x=1, n\3, s=tn*x; sum(y=x, n\2, is_A000217(s(ny)*y))) \\  M. F. Hasler, Oct 11 2013


CROSSREFS

Cf. A000217, A000290.
Cf. A008443, A053604, A053603, A052343, A052344, A008441.
Sequence in context: A144032 A137686 A143792 * A029375 A071462 A101979
Adjacent sequences: A230118 A230119 A230120 * A230122 A230123 A230124


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Oct 10 2013


STATUS

approved



