

A297788


Number of partitions of n into 3 squares and a nonnegative cube.


2



1, 2, 2, 2, 2, 2, 2, 1, 2, 4, 4, 3, 3, 3, 3, 1, 2, 5, 5, 4, 3, 3, 3, 1, 2, 5, 6, 6, 4, 4, 5, 2, 3, 6, 6, 6, 5, 6, 5, 3, 3, 7, 6, 4, 6, 6, 6, 2, 3, 7, 6, 7, 6, 7, 8, 3, 4, 6, 6, 6, 5, 6, 8, 4, 4, 9, 8, 8, 7, 8, 7, 2, 6, 10, 9, 8, 8, 9, 7, 2, 6, 12, 11, 8, 7, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

When n is not of the form 4^a * (8b + 7), according to Legendre's threesquare theorem, n = x^2 + y^2 + z^2 = x^2 + y^2 + z^2 + 0^3 (where a, b, x, y and z are nonnegative integers with x <= y <= z).
If n = 8b + 7, then n  1 = 8b + 6 is not of the form 4^a * (8b + 7). So n = (n  1) + 1 = x^2 + y^2 + z^2 + 1^3.
If n = 4 * (8b + 7), then n  1 = 8 * (4b + 3) + 3 is also not of the form 4^a * (8b + 7).
If n = 4^2 * (8b + 7), then n  8 = 4 * (8 * (4b + 3) + 2) is not of the form 4^a * (8b + 7). n = (n  8) + 8 = x^2 + y^2 + z^2 + 2^3.
If n = 4^k * (8b + 7) (k >= 3), then n  8 = 4 * (8 * (4^(k  1) * b + 4^(k  3) * 14)  2) = 4 * (8m  2) is also not of the form 4^a * (8b + 7).
That is, every nonnegative integer can be represented as the sum of 3 squares and a nonnegative cube, so a(n) > 0.


LINKS

Robert Israel, Table of n, a(n) for n = 0..10000
Wikipedia, Legendre's threesquare theorem


EXAMPLE

2 = 0^2 + 0^2 + 1^2 + 1^3 = 0^2 + 1^2 + 0^2 + 1^3, a(2) = 2.
9 = 0^2 + 0^2 + 1^2 + 2^3 = 0^2 + 1^2 + 0^2 + 2^3 = 0^2 + 2^2 + 2^2 + 1^3 = 1^2 + 2^2 + 2^2 + 0^3, a(9) = 4.


MAPLE

N:= 100: # to get a(0)..a(N)
A:= Array(0..N):
for x from 0 to floor(sqrt(N)) do
for y from 0 to x while x^2 + y^2 <= N do
for z from 0 to y while x^2 + y^2 + z^2 <= N do
for w from 0 do
t:= x^2 + y^2 + z^2 + w^3;
if t > N then break fi;
A[t]:= A[t]+1;
od od od od:
convert(A, list); # Robert Israel, Jan 11 2018


MATHEMATICA

a[n_]:=Sum[If[x^2+y^2+z^2+w^3==n, 1, 0], {x, 0, n^(1/2)}, {y, x, (nx^2)^(1/2)}, {z, y, (nx^2y^2)^(1/2)}, {w, 0, (nx^2y^2z^2)^(1/3)}]
Table[a[n], {n, 0, 86}]


CROSSREFS

Cf. A002635, A004215, A274274.
Sequence in context: A241927 A297033 A194318 * A194342 A230410 A044925
Adjacent sequences: A297785 A297786 A297787 * A297789 A297790 A297791


KEYWORD

nonn


AUTHOR

XU Pingya, Jan 06 2018


STATUS

approved



