A014778
Numbers k equal to the number of 1's in the decimal digits of all numbers <= k.
Original entry on oeis.org
0, 1, 199981, 199982, 199983, 199984, 199985, 199986, 199987, 199988, 199989, 199990, 200000, 200001, 1599981, 1599982, 1599983, 1599984, 1599985, 1599986, 1599987, 1599988, 1599989, 1599990, 2600000, 2600001, 13199998, 35000000
Offset: 1
a(5)=199983 because the number of 1's in the decimal digits of the numbers from 0 to 199983 is 199983 and this is the 5th such number.
- Maurice Protat, "Des Olympiades à l'Agrégation", Editions Ellipses, Paris 1997, p. 183.
Cf.
A165617 for the sequence generalized to an arbitrary base. - Martin J. Erickson (erickson(AT)truman.edu), Oct 08 2010
-
Join[{0},With[{nn=35*10^6},Position[Thread[{Accumulate[ DigitCount[ Range[nn],10,1]], Range[nn]}],{x_,x_}]]]//Flatten (* Harvey P. Dale, Oct 14 2017 *)
-
from itertools import count, islice
def agen(s=0): # generator of terms
yield from (k for k in count(0) if (s:=s+str(k).count('1'))==k)
print(list(islice(agen(),26))) # Michael S. Branicky, Oct 02 2023
Corrected and extended by Deepan Majmudar (deepan.majmudar(AT)hp.com), Nov 19 2004
41 further terms from
Ryan Propper, Dec 07 2004, who observed that there are no more terms <= 10^9
The final (84th) term 1111111110 was sent by Lambrecht Kok (L.P.Kok(AT)rug.nl), Jan 13 2005. He says: "H. van Haeringen and I showed that this list of 84 terms is complete on Dec 15 2004".
Independently shown to be complete by
Ryan Propper and Vaughan Pratt, Jan 08 2005
A101640
Positive integers n for which n = f(n), where f(n) is the total number of 3's required when writing out all numbers between 0 and n.
Original entry on oeis.org
371599983, 371599984, 371599985, 371599986, 371599987, 371599988, 371599989, 371599990, 371599991, 371599992, 500000000, 10000000000, 10371599983, 10371599984, 10371599985, 10371599986, 10371599987, 10371599988
Offset: 1
a(1) = 371599983, since writing out all numbers from 0 to 371599983 requires that 371599983 3's be used and since 371599983 is the first such positive integer.
a(4) = 371599986 because the number of 3's in the decimal digits of the numbers from 1 to 371599986 is 371599986 and this is the 4th such number.
More terms from Daniel Hirschberg (dan(AT)ics.uci.edu), May 05 2007
A101641
Positive integers n for which n = f(n), where f(n) is the total number of 4's required when writing out all numbers between 0 and n.
Original entry on oeis.org
499999984, 499999985, 499999986, 499999987, 499999988, 499999989, 499999990, 499999991, 499999992, 499999993, 500000000, 10000000000, 10499999984, 10499999985, 10499999986, 10499999987, 10499999988, 10499999989
Offset: 1
a(1) = 499999984, since writing out all numbers from 0 to 499999984 requires that 499999984 4's be used and since 499999984 is the first such positive integer.
a(4) = 499999987 because the number of 4's in the decimal digits of the numbers from 1 to 499999987 is 499999987 and this is the 4th such number.
More terms from Daniel Hirschberg (dan(AT)ics.uci.edu), May 05 2007
A130428
List of numbers n such that n is equal to the number of 6's in the decimal digits of all numbers <= n.
Original entry on oeis.org
0, 9500000000, 9628399986, 9628399987, 9628399988, 9628399989, 9628399990, 9628399991, 9628399992, 9628399993, 9628399994, 9628399995, 10000000000, 19500000000, 19628399986, 19628399987, 19628399988, 19628399989
Offset: 1
a(5)=9628399988 because the number of 6's in the decimal digits of the numbers from 0 to 9628399988 is 9628399988 and this is the 5th such number.
A130430
List of numbers n such that n is equal to the number of 8's in the decimal digits of all numbers <= n.
Original entry on oeis.org
0, 9465000000, 9486799989, 9486799990, 9486799991, 9486799992, 9486799993, 9486799994, 9486799995, 9486799996, 9486799997, 9497400000, 9498399989, 9498399990, 9498399991, 9498399992, 9498399993, 9498399994, 9498399995
Offset: 1
a(5)=9486799991 because the number of 8's in the decimal digits of the numbers from 0 to 9486799991 is 9486799991 and this is the 5th such number.
A101639
Positive integers n for which n = f(n), where f(n) is the total number of 2's required when writing out all numbers between 0 and n.
Original entry on oeis.org
28263827, 35000000, 242463827, 500000000, 528263827, 535000000, 10000000000, 10028263827, 10035000000, 10242463827, 10500000000, 10528263827, 10535000000
Offset: 1
a(1) = 28263827 since writing out all numbers from 0 to 28263827 requires that 28263827 2's be used and since 28263827 is the first such positive integer.
a(4) = 500000000 because the number of 2's in the decimal digits of the numbers from 1 to 500000000 is 500000000 and this is the 4th such number.
More terms from Daniel Hirschberg (dan(AT)ics.uci.edu), May 05 2007
A130427
Complete list of all 5 numbers n such that n is equal to the number of 5's in the decimal digits of all numbers <= n.
Original entry on oeis.org
0, 10000000000, 20000000000, 30000000000, 40000000000
Offset: 1
a(5) = 40000000000 because the number of 5's in the decimal digits of the numbers from 0 to 40000000000 is 40000000000 and this is the 5th such number.
A130431
Complete list of all 9 numbers n such that n is equal to the number of 9's in the decimal digits of all numbers <= n.
Original entry on oeis.org
0, 10000000000, 20000000000, 30000000000, 40000000000, 50000000000, 60000000000, 70000000000, 80000000000
Offset: 1
a(5)=40000000000 because the number of 9's in the decimal digits of the numbers from 0 to 40000000000 is 40000000000 and this is the 5th such number.
A130432
For digit n from 1 to 9, a(n) = the number of numbers m such that m is equal to the number of n's in the decimal digits of all numbers <= m.
Original entry on oeis.org
84, 14, 36, 48, 5, 72, 49, 344, 9
Offset: 1
a(3)=36 because there are 36 numbers m such that m is equal to the number of 3's in the decimal digits of all numbers <= m.
A163500
a(n) is the smallest number x > 1 such that n appears as a substring of the decimal representations of the numbers [0..x] exactly x times.
Original entry on oeis.org
199981, 28263827, 371599983, 499999984, 10000000000, 9500000000, 9465000000, 9465000000, 10000000000
Offset: 1
-
(define (count-matches re str start-pos) (let ((m (regexp-match-positions re str start-pos))) (if m (+ 1 (count-matches re str (+ (caar m) 1))) 0))) (define (matches-n-in-zero-to-k fn n) (do ((sum-so-far 1) (k (+ n 1)) (re (regexp (format "~a" n)))) ((fn sum-so-far k) k) (when (equal? 0 (modulo k 1000000)) ;; this is just a progress indicator (display (format "~a ~a ~a\n" n k sum-so-far))) (set! k (+ k 1)) (set! sum-so-far (+ sum-so-far (count-matches re (format "~a" k) 0))))) (define (s f n) (display (matches-n-in-zero-to-k f n))) ;; where f should be one of = or > depending on which sequence you care about. ;; this could be made much more efficient, of course. In particular, the ;; initial sequences up to the first x of m digits have serious regularity.
Showing 1-10 of 13 results.
Comments