The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A178983 The smallest cube containing n as a substring. 1
 0, 1, 27, 343, 64, 125, 64, 27, 8, 729, 1000, 91125, 125, 1331, 140608, 15625, 216, 1728, 85184, 2197, 205379, 216, 226981, 103823, 13824, 125, 9261, 27, 1728, 729, 39304, 1331, 5832, 1331, 343, 35937, 97336, 3375, 13824, 39304, 4096, 531441, 42875, 343 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS T. D. Noe, Table of n, a(n) for n = 0..1000 EXAMPLE a(3) = 7^3 = 343, because it contains 3 as a substring and no smaller cube contains 3. MATHEMATICA subs[n_] := Module[{d = IntegerDigits[n], len}, len = Length[d]; Union[Flatten[Table[FromDigits[Take[d, {i, k}]], {k, len}, {i, k}]]]]; Table[k = 0; While[! MemberQ[subs[k^3], n], k++]; k^3, {n, 0, 100}] (* T. D. Noe, Nov 06 2013 *) PROG (Ruby) # For a given nonnegative integer n, # find the smallest nonnegative cube that contains it as a substring. NUM_TERMS = 30 (0...NUM_TERMS).each{ |i|   (0..(1.0/0.0)).each{ |j|     (print "#{j*j*j}" + ", "; break) if "#{j*j*j}".include?("#{i}")   } } CROSSREFS Cf. A029943, A029947. Sequence in context: A182668 A076394 A133211 * A029947 A030673 A030683 Adjacent sequences:  A178980 A178981 A178982 * A178984 A178985 A178986 KEYWORD nonn,easy,base AUTHOR Andy Martin, Jan 02 2011 EXTENSIONS Edited by Alois P. Heinz, Jan 02 2011 STATUS approved

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

Last modified August 4 15:33 EDT 2020. Contains 336201 sequences. (Running on oeis4.)