cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A014778 Numbers k equal to the number of 1's in the decimal digits of all numbers <= k.

This page as a plain text file.
%I A014778 #51 Feb 16 2025 08:32:33
%S A014778 0,1,199981,199982,199983,199984,199985,199986,199987,199988,199989,
%T A014778 199990,200000,200001,1599981,1599982,1599983,1599984,1599985,1599986,
%U A014778 1599987,1599988,1599989,1599990,2600000,2600001,13199998,35000000
%N A014778 Numbers k equal to the number of 1's in the decimal digits of all numbers <= k.
%C A014778 The full list of 84 terms is given in the b-file.
%C A014778 It can be proved that this sequence is finite. (The main idea of the proof is that the number of 1's used in positive integers <= k is greater than or equal to A(k) = (1/10)*(number of digits in positive integers from 1 to k) = (1/10) Sum_{i=1..k} (1+floor(log_10 i)). By considering the area below a logarithmic function and the corresponding integral, it can be shown that A(k)/k goes to infinity.) - _Joseph L. Pe_, Nov 05 2002
%C A014778 Fixed points of A094798. Sequence consists of six runs of ten consecutive numbers, ten pairs of consecutive numbers and four isolated numbers. - _David Wasserman_, Jun 29 2007
%D A014778 Maurice Protat, "Des Olympiades à l'Agrégation", Editions Ellipses, Paris 1997, p. 183.
%H A014778 Graeme McRae, May 26 2007, <a href="/A014778/b014778.txt">Table of n, a(n) for n = 1..84</a> (complete sequence)
%H A014778 Tanya Khovanova and Gregory Marton, <a href="https://arxiv.org/abs/2305.10357">Archive Labeling Sequences</a>, arXiv:2305.10357 [math.HO], 2023.
%H A014778 Ed Pegg Jr. and Eric W. Weisstein, <a href="https://mathworld.wolfram.com/news/2004-10-13/google/">Mathematica's Google Aptitude</a>, MathWorld Headline news, Oct 13 2004.
%e A014778 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.
%t A014778 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 *)
%o A014778 (Python)
%o A014778 from itertools import count, islice
%o A014778 def agen(s=0): # generator of terms
%o A014778     yield from (k for k in count(0) if (s:=s+str(k).count('1'))==k)
%o A014778 print(list(islice(agen(),26))) # _Michael S. Branicky_, Oct 02 2023
%Y A014778 Cf. A101639, A101640, A101641, A130427, A130428, A130429, A130430, A130431; cf. A130432 for the number of numbers in these sequences.
%Y A014778 Cf. A094798.
%Y A014778 Cf. A165617 for the sequence generalized to an arbitrary base. - Martin J. Erickson (erickson(AT)truman.edu), Oct 08 2010
%K A014778 base,fini,nonn,full
%O A014778 1,3
%A A014778 Yves Babe, Maurice Protat, _Olivier Gérard_
%E A014778 Corrected and extended by Deepan Majmudar (deepan.majmudar(AT)hp.com), Nov 19 2004
%E A014778 41 further terms from _Ryan Propper_, Dec 07 2004, who observed that there are no more terms <= 10^9
%E A014778 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".
%E A014778 Independently shown to be complete by _Ryan Propper_ and Vaughan Pratt, Jan 08 2005
%E A014778 Edited by _M. F. Hasler_, Feb 12 2013