cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jul 27 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. In other words, each n = 0,1,2,... can be written as x^2 + 2y*(y+2) + z*(z+3)/2 with x,y,z nonnegative integers.
As pointed out by Sun in his 2007 paper in Acta Arith., a result of Jones and Pall implies that every n = 0,1,2,... can be written as x^2 + 2*(2y)^2 + z*(z+1)/2 with x,y,z nonnegative integers.
Let a,c,e be positive integers, and let b,d,f be nonnegative integers with a-b, c-d, e-f all even. Suppose that a|b, c|d and e|f. The author studied in arXiv:1502.03056 when each nonnegative integer can be written as x*(a*x+b)/2 + y*(c*y+d)/2 + z*(e*z+f)/2 with x,y,z nonnegative integers, and conjectured that the answer is positive if (a,b,c,d,e,f) is among the following ten tuples (4,0,2,0,1,3), (4,0,2,0,1,5), (4,0,2,6,1,1), (4,0,2,6,2,0), (4,4,2,0,1,3), (4,8,2,0,1,1), (4,8,2,0,1,3), (4,12,2,0,1,1), (6,0,2,0,1,3), (6,6,2,0,1,3).
See also A287616 and A286944 for related comments.

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.
		

Crossrefs

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