A191766 Integers that are a sum of two triangular numbers and also the sum of two square numbers (including zeros).
0, 1, 2, 4, 9, 10, 13, 16, 18, 20, 25, 29, 34, 36, 37, 45, 49, 58, 61, 64, 65, 72, 73, 81, 90, 97, 100, 101, 106, 121, 130, 136, 137, 144, 146, 148, 153, 157, 160, 164, 169, 181, 193, 196, 200, 202, 205, 208, 218, 225, 226, 232, 234, 241, 244, 245
Offset: 1
Keywords
Examples
9 is the sum of two triangular numbers: 6 + 3, and also two squares: 9 + 0. Hence 9 is in the sequence.
Links
- P. A. Piza, Problems for Solution: 4425 The American Mathematical Monthly, Vol. 58, No. 2, (February 1951), p. 113.
- P. A. Piza, G. W. Walker, and C. M. Sandwick, Sr., 4425, The American Mathematical Monthly, Vol. 59, No. 6, (June - July 1952), pp. 417-419.
Programs
-
Mathematica
data=Length[Reduce[a^2+b^2==1/2 c (c+1)+1/2 d(d+1) == # && a>=0 && b>=0 && c>=0 && d>=0,{a,b,c,d},Integers]] &/@Range[0,250];Prepend[DeleteCases[Table[If[data[[k]]>0,k-1,0],{k,1,Length[data]}],0],0] With[ {n = 250}, Pick[ Range[ 0, n], {} != FindInstance[ a*a + b*b == # && c (c + 1) + d (d + 1) == 2 # && a >= 0 && b >= 0 && c >= 0 && d >= 0, {a, b, c, d}, Integers] & /@ Range[ 0, n]]] (* Michael Somos, Jun 24 2011 *)
Comments