Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 May 11 2021 09:53:25
%S 0,0,0,1,0,0,0,1,1,1,0,1,2,0,1,4,0,2,1,3,1,1,1,1,4,4,3,1,2,3,1,8,2,1,
%T 3,4,4,3,6,3,2,4,3,3,5,3,2,7,7,8,3,7,5,6,6,1,4,4,6,8,7,2,6,14,8,6,5,7,
%U 4,10,6,4,5,7,7,6,10,10,4,14,11,6,8,11,8,6,6,3,8,10,11,9,7,6,13,19,4,11,8,16
%N Number of ways to write n = x + y + 2*z with 0 < x <= y and z > 0 such that x^2 + y^2 + 2*z^2 is a square.
%C Conjecture: a(n) > 0 for all n > 17.
%C Note that a(4*k) > 0 for all k > 0 since 4*k = k + k + 2*k and k^2 + k^2 + 2*k^2 = (2*k)^2.
%C See also A230121 for a related conjecture.
%C The conjecture was confirmed by Chao Haung and Zhi-Wei Sun in 2021. - _Zhi-Wei Sun_, May 09 2021
%H Zhi-Wei Sun, <a href="/A230747/b230747.txt">Table of n, a(n) for n = 1..4000</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(9) = 1 since 9 = 1 + 4 + 2*2 with 1^2 + 4^2 + 2*2^2 = 5^2.
%e a(21) = 1 since 21 = 5 + 8 + 2*4 with 5^2 + 8^2 + 2*4^2 = 11^2.
%e a(34) = 1 since 34 = 7 + 25 + 2*1 with 7^2 + 25^2 + 2*1^2 = 26^2.
%e a(56) = 1 since 56 = 14 + 14 + 2*14 with 14^2 + 14^2 + 2*14^2 = 28^2.
%t SQ[n_]:=IntegerQ[Sqrt[n]]
%t a[n_]:=Sum[If[SQ[2i^2+j^2+(n-2i-j)^2],1,0],{i,1,(n-2)/2},{j,1,(n-2i)/2}]
%t Table[a[n],{n,1,100}]
%Y Cf. A000290, A230121, A343950.
%K nonn
%O 1,13
%A _Zhi-Wei Sun_, Oct 29 2013