A102357 "True so far" sequence: floor(a(n)/10) is the number of digits (a(n) mod 10) within the first n terms; a(n) is the smallest such number larger than a(n-1).
10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 34, 35, 36, 37, 38, 39, 40, 45, 46, 47, 48, 49, 50, 56, 57, 58, 59, 60, 67, 68, 69, 70, 78, 79, 80, 89, 90, 102, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 117, 118, 119, 123
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..2024 (based on C. Seggelin's data)
- Eric Angelini, Sequence True-so-far
- Eric Angelini, Sequence True-so-far [Cached copy with permission]
- C. Seggelin, Sequence True-So-Far
Crossrefs
Cf. A102850.
Programs
-
Mathematica
a[0] = {}; a[n_] := a[n] = Block[{k = Max[a[n - 1], 0], b = Sort[ Flatten[ Table[ IntegerDigits[ a[i]], {i, 0, n - 1}] ]]}, While[ Count[ Join[b, IntegerDigits[ IntegerPart[k/10]]], Mod[k, 10]] != IntegerPart[k/10], k++ ]; k]; Table[ a[n], {n, 63}] (* Robert G. Wilson v, Feb 22 2005 *)
-
PARI
c=Vec(0, 10); a=10; for(n=1, 2024, while(a\10<=c[a%10+1] || a\10 != c[a%10+1]+#select(d->d==a%10, digits(a)), a++); [c[d+1]++|d<-digits(a)]; print1(a",")) \\ M. F. Hasler, Nov 18 2019
Extensions
Chuck Seggelin and David W. Wilson both computed the full 2024 terms
Offset corrected by Nathaniel Johnston, May 17 2011
Edited and shorter definition from M. F. Hasler, Nov 18 2019
Comments