OFFSET
1,2
COMMENTS
Conjecture: a(n) > 0 for all n > 0. In other words, any positive integer n can be written as s^2 + t^2 + u^2 + 2*v^2, where s is a positive integer, t is a triangular number, u and v are generalized pentagonal numbers.
I have verified a(n) > 0 for all n = 1..5*10^6.
It is well known that any positive odd integer can be written as x^2 + y^2 + 2*z^2 with x,y,z integers.
See also A306614 for similar conjectures.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
EXAMPLE
a(1) = 1 with 1 = 1^2 + T(0)^2 + Pen(0)^2 + 2*Pen(0)^2.
a(23) = 1 with 23 = 4^2 + T(1)^2 + Pen(-1)^2 + 2*Pen(1)^2.
a(335) = 1 with 335 = 18^2 + T(2)^2 + Pen(0)^2 + 2*Pen(1)^2.
a(3695) = 1 with 3695 = 53^2 + T(7)^2 + Pen(-1)^2 + 2*Pen(-2)^2.
MATHEMATICA
t[x_]:=t[x]=x(x+1)/2; p[x_]:=p[x]=x(3x-1)/2;
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[SQ[n-t[x]^2-p[y]^2-2*p[z]^2], r=r+1], {x, 0, (Sqrt[8*Sqrt[n-1]+1]-1)/2}, {y, -Floor[(Sqrt[24*Sqrt[n-1-t[x]^2]+1]-1)/6], (Sqrt[24*Sqrt[n-1-t[x]^2]+1]+1)/6},
{z, -Floor[(Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]-1)/6], (Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]+1)/6}]; tab=Append[tab, r], {n, 1, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 28 2019
STATUS
approved