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.

A160325 Number of ways to express n=0,1,2,... as the sum of a triangular number, an even square and a pentagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 08 2009

Keywords

Comments

In April 2009, Zhi-Wei Sun conjectured that a(n)>0 for every n=0,1,2,3,... Note that pentagonal numbers are more sparse than squares. It is known that any positive integer can be written as the sum of a triangular number, a square and an even square (or an odd square).

Examples

			For n=15 the a(15)=5 solutions are 3+0+12, 6+4+5, 10+0+5, 10+4+1, 15+0+0.
		

Crossrefs

Programs

  • Mathematica
    SQ[x_]:=x>-1&&IntegerPart[Sqrt[x]]^2==x RN[n_]:=Sum[If[SQ[8(n-4y^2-(3z^2-z)/2)+1],1,0], {y,0,Sqrt[n/4]},{z,0,Sqrt[n-4y^2]}] Do[Print[n," ", RN[n]],{n,0,60000}]

Formula

a(n) = |{: x,y,z=0,1,2,... & x(x+1)/2+4y^2+(3z^2-z)/2}|.

Extensions

More terms copied from author's b-file by Hagen von Eitzen, Jul 20 2009