cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A212098 Number of (w,x,y,z) with all terms in {1,...,n} and w^3<=x^3+y^3+z^3.

This page as a plain text file.
%I A212098 #22 Sep 03 2024 15:03:53
%S A212098 0,1,15,72,221,536,1104,2034,3451,5514,8380,12246,17322,23812,31981,
%T A212098 42107,54457,69350,87100,108049,132591,161085,193966,231592,274511,
%U A212098 323077,377830,439314,507948,584401,669124,762764,865882,979130
%N A212098 Number of (w,x,y,z) with all terms in {1,...,n} and w^3<=x^3+y^3+z^3.
%C A212098 For a guide to related sequences, see A211795.
%H A212098 Giovanni Resta, <a href="/A212098/b212098.txt">Table of n, a(n) for n = 0..1000</a>
%F A212098 a(n) + A212099(n) = n^4.
%p A212098 f:= proc(n) local x,y,z, r, t;
%p A212098    r:= 0:
%p A212098    for x from 1 to n do
%p A212098      for y from x to n do
%p A212098        for z from y to n do
%p A212098           t:= min(n, floor((x^3 + y^3 + z^3)^(1/3)));
%p A212098           if x = z then r:= r+t
%p A212098           elif x=y or y=z then r:= r+3*t
%p A212098           else r:= r+6*t
%p A212098           fi
%p A212098    od od od;
%p A212098    r
%p A212098 end proc:
%p A212098 map(f, [$0..40]); # _Robert Israel_, May 08 2017
%t A212098 t = Compile[{{n, _Integer}}, Module[{s = 0},
%t A212098 (Do[If[w^3 <= x^3 + y^3 + z^3, s = s + 1],
%t A212098 {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t A212098 Map[t[#] &, Range[0, 40]] (* A212098 *)
%t A212098 (* _Peter J. C. Moses_, Apr 13 2012 *)
%o A212098 (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
%Y A212098 Cf. A211795, A212099.
%K A212098 nonn
%O A212098 0,3
%A A212098 _Clark Kimberling_, May 03 2012