The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061105 Smallest number whose digital sum is n^3. 6
0, 1, 8, 999, 19999999, 89999999999999, 999999999999999999999999, 199999999999999999999999999999999999999, 899999999999999999999999999999999999999999999999999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
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)
LINKS
FORMULA
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
EXAMPLE
a(4) = 19999999, 1+9+9+9+9+9+9+9 = 64 = 4^3.
MATHEMATICA
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} ]
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 *)
PROG
(PARI) { for (n=0, 20, a=((n%3)^3 + 1)*10^(n^3\9) - 1; write("b061105.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 19 2009
CROSSREFS
Cf. A061104.
Sequence in context: A183888 A181965 A159868 * A118545 A017091 A164883
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 20 2001
EXTENSIONS
More terms from Robert G. Wilson v, Apr 21 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 12:09 EDT 2024. Contains 372773 sequences. (Running on oeis4.)