login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331375 a(n) is the number of times the digit 1 appears in the concatenation of integers from 0 to n, minus the number of times the next most frequent digit appears. 2

%I #29 Mar 06 2020 13:32:27

%S -1,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,9,9,7,6,5,4,3,2,1,0,0,1,0,

%T 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,

%U 0,0,0,0,1,0,0,0,0,0,0,0,0,0,1

%N a(n) is the number of times the digit 1 appears in the concatenation of integers from 0 to n, minus the number of times the next most frequent digit appears.

%C Other than a(0) = 0 the digit 1 is the most frequently seen digit in the concatenation of the integers from 0 to n. See A094798 for the exact number of times. This sequence is the difference between that number and the number of times the next most frequent digit appears. For almost all numbers the next most frequent digit is 2. That only changes to the digit 0 once per order of magnitude, after reaching the number consisting of two or more 1's followed by 0. The digit 0 keeps this record for the next number, a repunit, after which the number of appearances of 2 again either equals or surpasses the number of appearances of 0.

%C When concatenating the integers from 0 to 10^k, with k >= 2, this sequence reaches its maximum value of 10^(k-1) at n = 10^k/5-1.

%H Scott R. Shannon, <a href="/A331375/b331375.txt">Table of n, a(n) for n = 1..10000</a>

%e a(0) = -1 as after '0' the digit 0 has appeared once while 1 has not appeared, so a(0) = 0 - 1 = -1.

%e a(10) = 0 as after '012345678910' the digits 0 and 1 have both appeared two times, so a(10) = 2 - 2 = 0.

%e a(11) = 2 as after '01234567891011' the digit 1 has appeared four times and the digit 0 two times, so a(11) = 4 - 2 = 2.

%Y Cf. A094798, A007376.

%K sign,base

%O 0,12

%A _Scott R. Shannon_, Jan 14 2020

%E Deleted a conjectured but incorrect g.f. and recurrence. - _N. J. A. Sloane_, Jan 17 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 11:14 EDT 2024. Contains 372207 sequences. (Running on oeis4.)