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.
%I A061105 #22 Dec 06 2024 21:43:39 %S A061105 0,1,8,999,19999999,89999999999999,999999999999999999999999, %T A061105 199999999999999999999999999999999999999, %U A061105 899999999999999999999999999999999999999999999999999999999 %N A061105 Smallest number whose sum of digits is n^3. %C A061105 Except for the leading digit all the other digits of a(n), n >= 1, are 9's and the leading digit is 1 or 8. (This is because the digital sum of n^3 is congruent to 0, 1, or 8 mod 9, so the best we can do is use as many 9's as possible, prefixed if necessary by 1 or 8. - _N. J. A. Sloane_, Jul 19 2018) %H A061105 Harry J. Smith, <a href="/A061105/b061105.txt">Table of n, a(n) for n=0,...,20</a> %F A061105 a(n) = A051885(n^3). %F A061105 a(n) =((n mod 3)^3+1)*10^floor[n^3/9]-1 =(A021559(n+1)+1)*10^A061263(n)-1. - _Henry Bottomley_, Apr 24 2001 %e A061105 a(4) = 19999999, 1+9+9+9+9+9+9+9 = 64 = 4^3. %t A061105 Do[a = {}; While[Apply[Plus, a] + 9 < n^3, a = Append[a, 9]]; If[ Apply[ Plus, a] != n^3, a = Prepend[ a, n^3 - Apply[ Plus, a]] ]; Print[ FromDigits[ a]], {n, 1, 10} ] %t A061105 dsn3[n_]:=Module[{t=(n^3-{0,1,8})/9},Which[ IntegerQ[t[[1]]],FromDigits[ PadRight[ {},t[[1]],9]],IntegerQ[t[[2]]],FromDigits[ PadRight[ {1}, t[[2]]+1,9]],IntegerQ[t[[3]]],FromDigits[PadRight[{8},t[[3]]+1,9]]]]; Array[dsn3,10,0] (* _Harvey P. Dale_, Jul 19 2018 *) %o A061105 (PARI) a(n) = { ((n%3)^3 + 1)*10^(n^3\9) - 1 } \\ _Harry J. Smith_, Jul 19 2009 %Y A061105 Cf. A051885, A061104. %K A061105 nonn,base %O A061105 0,3 %A A061105 _Amarnath Murthy_, Apr 20 2001 %E A061105 More terms from _Robert G. Wilson v_, Apr 21 2001