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.

A100854 Least number of positive cubes that sum to n^2.

This page as a plain text file.
%I A100854 #7 May 06 2016 05:49:24
%S A100854 1,4,2,2,4,3,7,1,3,4,6,4,5,6,3,4,4,5,5,6,4,4,4,2,5,5,1,4,5,4,4,2,4,5,
%T A100854 4,4,4,6,4,4,5,4,6,5,4,6,6,3,4,5,5,6,3,4,4,5,5,5,3,4,5,4,4,1,4,5,5,4,
%U A100854 4,6,3,3,5,6,5,4,4,3,5,4,2,5,5,3,5,5,3,6,5,3,4,6,5,5,4,3,5,2,4,3
%N A100854 Least number of positive cubes that sum to n^2.
%F A100854 a(n) = A002376(n^2). - _R. J. Mathar_, May 06 2016
%e A100854 a(2)=4 because 4=1+1+1+1;
%e A100854 a(3)=2 because 9=1+8;
%e A100854 a(4)=2 because 16=8+8.
%t A100854 nn=100^2; cnt=Table[10, {nn}]; maxN=Floor[nn^(1/3)]; Do[v={a, b, c, d, e, f, g, h, i}; n=Plus@@(v^3); If[n>0 && n<=nn, cnt[[n]]=Min[cnt[[n]], 9-Count[v, 0]]], {a, 0, maxN}, {b, a, maxN}, {c, b, maxN}, {d, c, maxN}, {e, d, maxN}, {f, e, maxN}, {g, f, maxN}, {h, f, maxN}, {i, h, maxN}]; Table[cnt[[n^2]], {n, 100}] (T. D. Noe)
%Y A100854 Cf. A002376 (least number of positive cubes needed to represent n).
%K A100854 easy,nonn
%O A100854 1,2
%A A100854 _Giovanni Teofilatto_, Jan 08 2005
%E A100854 Corrected and extended by _T. D. Noe_, Jan 10 2005