login
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.
12

%I #24 May 11 2021 06:00:16

%S 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,

%T 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,

%U 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

%N 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.

%C 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.

%C (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.

%C (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.

%C (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.

%C 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

%H Zhi-Wei Sun, <a href="/A230121/b230121.txt">Table of n, a(n) for n = 1..3000</a>

%H Chao Huang and Zhi-Wei Sun, <a href="http://arxiv.org/abs/2105.03416">On partitions of integers with restrictions involving squares</a>, arXiv:2105.03416 [math.NT], 2021.

%H Zhi-Wei Sun, <a href="http://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;7aed50fa.1310">Diophantine problems involving triangular numbers and squares</a>, a message to Number Theory List, Oct. 11, 2013.

%e a(16) = 1 since 16 = 3 + 6 + 7 and 3*4/2 + 6*7/2 + 7*8/2 = 55 = 10*11/2.

%t SQ[n_]:=IntegerQ[Sqrt[n]]

%t T[n_]:=n(n+1)/2

%t 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}]

%t Table[a[n],{n,1,100}]

%o (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

%Y Cf. A000217, A000290.

%Y Cf. A008443, A053604, A053603, A052343, A052344, A008441.

%K nonn

%O 1,9

%A _Zhi-Wei Sun_, Oct 10 2013