This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140057 Numbers such that each decimal digit d (for all d in the range 1 <= d <= 9) occurs only in runs of length exactly d. 2
 1, 22, 122, 221, 333, 1221, 1333, 3331, 4444, 13331, 14444, 22122, 22333, 33322, 44441, 55555, 122122, 122333, 133322, 144441, 155555, 221221, 221333, 223331, 224444, 333122, 333221, 444422, 555551, 666666, 1221221, 1221333, 1223331 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Number of terms less than 10^k: 1, 2, 5, 9, 16, 30, 53, 92, 163, 286, 497, 869, 1516, 2639, 4606, 8032, 13993, ..., . - Robert G. Wilson v Number of terms of k digits: 1, 1, 3, 4, 7, 14, 23, 39, 71, 123, 211, 372, 647, 1123, 1967, 3426, 5961, ..., ; not the same as A003242. - Robert G. Wilson v LINKS Robert G. Wilson v, Table of n, a(n) for n = 1..8032 MATHEMATICA (* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Block[{ pa=Partitions@ n, len = PartitionsP@ n, s, lst, lmt}, s = Select[Range@len, pa[[ #, 1]] < 10 &]; lst=Take[pa, {s[[1]], -1}]; lst = Flatten[ DistinctPermutations /@ lst, 1]; lmt = Length@ lst; While[lmt != 0, If[ Split[lst[[lmt]]] != Partition[lst[[lmt]], 1], lst = Delete[lst, lmt]]; lmt-- ]; Sort@ (FromDigits /@ Flatten /@ (lst /. {x_Integer -> Table[x, {x}]}))] (* Robert G. Wilson v, May 25 2008 *) CROSSREFS Sequence in context: A247700 A105776 A044354 * A044735 A247701 A039439 Adjacent sequences:  A140054 A140055 A140056 * A140058 A140059 A140060 KEYWORD base,easy,nonn AUTHOR Rick L. Shepherd, May 03 2008 EXTENSIONS Definition expanded by N. J. A. Sloane, May 20 2008 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 June 16 21:18 EDT 2019. Contains 324155 sequences. (Running on oeis4.)