OFFSET
0,2
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. The Gauss-Legendre theorem asserts that n is the sum of three squares if and only if it is not of the form 4^a(8b+7) (a,b=0,1,2,...).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..50000
Byeong-Kweon Oh and Zhi-Wei Sun, Mixed sums of squares and triangular numbers (III), J. Number Theory 129(2009), 964-969.
Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113.
Zhi-Wei Sun, Various new conjectures involving polygonal numbers and primes (a message to Number Theory List), 2009.
Zhi-Wei Sun, Mixed Sums of Primes and Other Terms (a webpage).
Zhi-Wei Sun, On universal sums of polygonal numbers, preprint, arXiv:0905.0635 [math.NT], 2009-2015.
FORMULA
a(n) = |{<x,y,z>: x,y=0,1,2,... & x^2+y^2+(3z^2-z)/2=n}|.
EXAMPLE
For n=5 the a(5)=5 solutions are 0+0+5, 1+4+0, 4+1+0, 0+4+1, 4+0+1.
MATHEMATICA
a = Compile[{{n, _Integer}}, Block[{c = 0}, Do[c += Boole[ Mod[ Sqrt[n - i (3 i - 1)/2 - j^2], 1] == 0], {i, 0, (1 + Sqrt[1 + 24 n])/6}, {j, 0, Sqrt[n - i (3 i - 1)/2]}]; c]]; Array[a, 101, 0] (* Robert G. Wilson v, Sep 04 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 08 2009
STATUS
approved
