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.

A270594 Number of ordered ways to write n as the sum of a triangular number, a positive square and the square of a generalized pentagonal number (A001318).

Original entry on oeis.org

1, 2, 1, 2, 4, 2, 2, 4, 2, 3, 5, 2, 2, 3, 3, 4, 3, 2, 4, 5, 1, 2, 5, 1, 3, 7, 3, 2, 6, 5, 3, 6, 2, 2, 5, 4, 6, 4, 3, 5, 8, 2, 2, 6, 2, 5, 5, 1, 4, 9, 5, 3, 8, 5, 4, 8, 4, 3, 5, 5, 5, 6, 3, 6, 11, 2, 3, 9, 2, 5, 12, 2, 2, 9, 6, 3, 4, 4, 5, 6, 6, 6, 5, 5, 6, 11, 2, 4, 8, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 19 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 21, 24, 48, 90, 138, 213, 283, 462, 468, 567, 573, 1998, 2068, 2488, 2687, 5208, 5547, 5638, 6093, 6492, 6548, 6717, 7538, 7731, 8522, 14763, 16222, 17143, 24958, 26148.
(ii) Let T(x) = x(x+1)/2, pen(x) = x(3x+1)/2 and hep(x) = x(5x+3)/2. Then any natural number can be written as P(x,y,z) with x, y and z integers, where P(x,y,z) is either of the following polynomials: T(x)^2+T(y)+z(5z+1)/2, T(x)^2+T(y)+z(3z+j) (j = 1,2), T(x)^2+y^2+pen(z), T(x)^2+pen(y)+hep(z), T(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), T(x)^2+pen(y)+z(4z+j) (j = 1,3), T(x)^2+pen(y)+z(5z+j) (j = 1,3,4), T(x)^2+pen(y)+z(11z+7)/2, T(x)^2+y(5y+1)/2+z(3z+2), T(x)^2+hep(y)+z(3z+2), pen(x)^2+T(y)+pen(z), pen(x)^2+T(y)+2*pen(z), pen(x)^2+T(y)+z(9z+7)/2, pen(x)^2+y^2+pen(z), pen(x)^2+2*T(y)+pen(z), pen(x)^2+pen(y)+3*T(z), pen(x)^2+pen(y)+2z^2, pen(x)^2+pen(y)+2*pen(z), pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), pen(x)^2+pen(y)+z(4z+3), pen(x)^2+pen(y)+z(9z+1)/2, pen(x)^2+pen(y)+3*pen(z), pen(x)^2+pen(y)+z(5z+j) (j = 1,2,3,4), pen(x)^2+pen(y)+z(11z+j)/2 (j = 7,9), pen(x)^2+pen(y)+z(7z+1), pen(x)^2+pen(y)+3*hep(z), pen(x)^2+y(5y+j)/2+z(3z+k) (j = 1,3; k = 1,2), pen(x)^2+hep(y)+z(7z+j)/2 (j = 1,3,5), pen(x)^2+hep(y)+z(9z+5)/2, pen(y)^2+2pen(y)+z(3z+2), pen(x)^2+2*pen(y)+3*pen(z), (x(5x+1)/2)^2+2*T(y)+pen(z), (x(5x+1)/2)^2+pen(y)+z(7z+3)/2, (x(5x+1)/2)^2+pen(y)+z(4z+1), (x(5x+1)/2)^2+hep(y)+2*pen(z), hep(x)^2+T(y)+2*pen(z), hep(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), hep(x)^2+pen(y)+z(4z+1), hep(x)^2+pen(y)+z(5z+4), 4*pen(x)^2+T(y)+hep(z), 4*pen(x)^2+T(y)+2*pen(z), 4*pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), (x(3x+2))^2+y^2+pen(z), (x(3x+2))^2+pen(y)+z(7z+j)/2 (j = 3,5), 2*T(x)^2+T(y)+z(3z+j) (j = 1,2), 2*T(x)^2+y^2+pen(z), 2*T(x)^2+2*T(y)+pen(z), 2*T(x)^2+pen(y)+z(7z+j)/2 (j = 1,5), 2*T(x)^2+pen(y)+z(5z+1), 2*pen(y)^2+T(y)+z(3z+2), 2*pen(x)^2+y^2+pen(z), 2*pen(x)^2+pen(y)+z(7z+3)/2, 2*pen(x)^2+pen(y)+z(4z+j) (j = 1,3), 2*pen(x)^2+pen(y)+z(5z+4), 2*pen(x)^2+pen(y)+z(7z+1), 2*pen(x)^2+hep(y)+2*pen(z), 2*hep(x)^2+pen(y)+z(7z+5)/2, 3*pen(x)^2+T(y)+z(3z+2), 3*pen(x)^2+y^2+pen(z), 3*pen(x)^2+2*T(y)+pen(z), 3*pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), 3*pen(x)^2+pen(y)+z(4z+1), 6*pen(x)^2+pen(y)+z(7z+3)/2.
See also A270566 for a similar conjecture involving four powers.
It is known that any positive integer can be written as the sum of a triangular number, a square and an odd square.

Examples

			a(21) = 1 since 21 = 1*2/2 + 4^2 + (1*(3*1+1)/2)^2.
a(24) = 1 since 24 = 5*6/2 + 3^2 + (0*(3*0-1)/2)^2.
a(468) = 1 since 468 = 0*1/2 + 18^2 + (3*(3*3-1)/2)^2.
a(7538) = 1 since 7538 = 64*65/2 + 47^2 + (6*(3*6+1)/2)^2.
a(7731) = 1 since 7731 = 82*83/2 + 62^2 + (4*(3*4-1)/2)^2.
a(8522) = 1 since 8522 = 127*128/2 + 13^2 + (3*(3*3+1)/2)^2.
a(14763) = 1 since 14763 = 164*165/2 + 33^2 + (3*(3*3-1)/2)^2.
a(16222) = 1 since 16222 = 168*169/2 + 45^2 + (1*(3*1-1)/2)^2.
a(17143) = 1 since 17143 = 182*183/2 + 21^2 + (2*(3*2+1)/2)^2.
a(24958) = 1 since 24958 = 216*217/2 + 39^2 + (1*(3*1-1)/2)^2.
a(26148) = 1 since 26148 = 10*11/2 + 142^2 + (7*(3*7+1)/2)^2.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[n]&&IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[pQ[Sqrt[n-x^2-y(y+1)/2]],r=r+1],{x,1,Sqrt[n]},{y,0,(Sqrt[8(n-x^2)+1]-1)/2}];Print[n," ",r];Continue,{n,1,90}]