login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212098
Number of (w,x,y,z) with all terms in {1,...,n} and w^3<=x^3+y^3+z^3.
3
0, 1, 15, 72, 221, 536, 1104, 2034, 3451, 5514, 8380, 12246, 17322, 23812, 31981, 42107, 54457, 69350, 87100, 108049, 132591, 161085, 193966, 231592, 274511, 323077, 377830, 439314, 507948, 584401, 669124, 762764, 865882, 979130
OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
LINKS
FORMULA
a(n) + A212099(n) = n^4.
MAPLE
f:= proc(n) local x, y, z, r, t;
r:= 0:
for x from 1 to n do
for y from x to n do
for z from y to n do
t:= min(n, floor((x^3 + y^3 + z^3)^(1/3)));
if x = z then r:= r+t
elif x=y or y=z then r:= r+3*t
else r:= r+6*t
fi
od od od;
r
end proc:
map(f, [$0..40]); # Robert Israel, May 08 2017
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w^3 <= x^3 + y^3 + z^3, s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 40]] (* A212098 *)
(* Peter J. C. Moses, Apr 13 2012 *)
PROG
(PARI) A212098(n)={my(s=0, c=[6, 3, 1]); forvec(v=vector(4, i, if(i>1, [1, n], [-n, -1])), sum(i=1, 4, v[i]^3)>=0&s+=c[1+(v[2]==v[3])+(v[3]==v[4])], 1); s} /* not very efficient */ \\ M. F. Hasler, May 20 2012
CROSSREFS
Sequence in context: A126274 A241234 A212097 * A053531 A000476 A002603
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 03 2012
STATUS
approved