%I #22 Jun 24 2021 12:56:04
%S 1,3,3,1,2,5,4,1,1,5,6,2,1,5,5,2,4,6,5,1,3,6,5,3,1,8,8,4,2,4,8,4,5,1,
%T 4,5,4,10,6,6,5,8,6,1,3,6,6,4,6,4,7,8,8,8,5,7,4,4,6,5,6,8,7,4,8,8,6,5,
%U 4,7,7,8,7,7,8,8,8,7,3,4,12,4,4,7,3,13,12,12,5,2,12,4,5,6,6,8,10,8,3,5,11
%N Number of ways to express n=0,1,2,... as the sum of two squares and a pentagonal number.
%C 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,...).
%H Zhi-Wei Sun, <a href="/A160326/b160326.txt">Table of n, a(n) for n = 0..50000</a>
%H B. K. Oh and Z. W. Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2008.10.002">Mixed sums of squares and triangular numbers (III)</a>, J. Number Theory 129(2009), 964-969.
%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.4064/aa127-2-1">Mixed sums of squares and triangular numbers</a>, Acta Arith. 127(2007), 103-113.
%H Zhi-Wei Sun, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;48c9be36.0905">Various new conjectures involving polygonal numbers and primes</a> (a message to Number Theory List), 2009.
%H Zhi-Wei Sun, <a href="http://math.nju.edu.cn/~zwsun/MSPT.htm">Mixed Sums of Primes and Other Terms (a webpage)</a>.
%H Z. W. Sun, <a href="http://arxiv.org/abs/0905.0635">On universal sums of polygonal numbers</a>, preprint, arXiv:0905.0635 [math.NT], 2009-2015.
%F a(n) = |{<x,y,z>: x,y=0,1,2,... & x^2+y^2+(3z^2-z)/2=n}|.
%e For n=5 the a(5)=5 solutions are 0+0+5, 1+4+0, 4+1+0, 0+4+1, 4+0+1.
%t SQ[x_]:=x>-1&&IntegerPart[Sqrt[x]]^2==x RN[n_]:=Sum[If[SQ[n-y^2-(3z^2-z)/2],1,0], {y,0,Sqrt[n]},{z,0,Sqrt[n-y^2]}] Do[Print[n," ", RN[n]],{n,0,50000}]
%Y Cf. A000290, A000326, A160324, A160325.
%K nonn
%O 0,2
%A _Zhi-Wei Sun_, May 08 2009