A290342 Number of ways to write n as x^2 + 2*y^2 + z*(z+1)/2, where x is a nonnegative integer, and y and z are positive integers.
0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 2, 2, 2, 1, 2, 4, 3, 2, 4, 2, 4, 4, 3, 1, 4, 5, 2, 5, 1, 3, 6, 5, 2, 3, 6, 3, 9, 3, 1, 6, 3, 5, 4, 4, 6, 7, 3, 2, 5, 3, 6, 9, 6, 3, 7, 6, 2, 8, 5, 4, 8, 6, 3, 4, 6, 3, 12, 2
Offset: 0
Keywords
Examples
a(10) = 1 since 10 = 1^2 + 2*2^2 + 1*2/2. a(11) = 1 since 11 = 0^2 + 2*2^2 + 2*3/2. a(16) = 1 since 16 = 2^2 + 2*1^2 + 4*5/2. a(26) = 1 since 26 = 3^2 + 2*1^2 + 5*6/2. a(31) = 1 since 31 = 1^2 + 2*1^2 + 7*8/2. a(41) = 1 since 41 = 6^2 + 2*1^2 + 2*3/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- B. W. Jones and G. Pall, Regular and semi-regular positive ternary quadratic forms, Acta Math. 70 (1939), 165-191.
- Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113.
- Zhi-Wei Sun, On universal sums x(ax+b)/2+y(cy+d)/2+z(ez+f)/2, arXiv:1502.03056 [math.NT], 2015-2017.
Programs
-
Mathematica
TQ[n_]:=TQ[n]=n>0&&IntegerQ[Sqrt[8n+1]] Do[r=0;Do[If[TQ[n-x^2-2y^2],r=r+1],{x,0,Sqrt[n]},{y,1,Sqrt[(n-x^2)/2]}];Print[n," ",r],{n,0,70}]
Comments