A102850 Non-monotonic "True so far" sequence: In the first n terms, the digit (a(n) mod 10) occurs floor(a(n)/10) times; a(n) is the smallest such number.
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, 124
Offset: 1
Examples
a(10) = 20 because up to this point there are two 0 digits in the sequence, including the 0 in 20. a(5191476) doesn't exist. 35893100 would yield a total of 3589311 0's, while 35893110 or 35893120 would yield 3589310 0's. Similar reasons prevent other terms ending with other digits.
Links
- M. F. Hasler, Table of n, a(n) for n = 1..10000, Nov 18 2019
Crossrefs
Cf. A102357.
Programs
-
PARI
c=Vec(0,10); for(n=1,351, a=vecmin(c)*10+10; 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
Comments