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.

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.

This page as a plain text file.
%I A331375 #29 Mar 06 2020 13:32:27
%S A331375 -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 A331375 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 A331375 0,0,0,0,1,0,0,0,0,0,0,0,0,0,1
%N 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.
%C A331375 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 A331375 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 A331375 Scott R. Shannon, <a href="/A331375/b331375.txt">Table of n, a(n) for n = 1..10000</a>
%e A331375 a(0) = -1 as after '0' the digit 0 has appeared once while 1 has not appeared, so a(0) = 0 - 1 = -1.
%e A331375 a(10) = 0 as after '012345678910' the digits 0 and 1 have both appeared two times, so a(10) = 2 - 2 = 0.
%e A331375 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 A331375 Cf. A094798, A007376.
%K A331375 sign,base
%O A331375 0,12
%A A331375 _Scott R. Shannon_, Jan 14 2020
%E A331375 Deleted a conjectured but incorrect g.f. and recurrence. - _N. J. A. Sloane_, Jan 17 2020