The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A061217 Number of zeros in the concatenation n(n-1)(n-2)(n-3)...321. 7
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 12, 13, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,20
COMMENTS
The number of zeros necessary to write down all the numbers 1, 2, ..., n. Thus, the partial sums of A055641 are given by a(n)+1 (for n>=1). - Hieronymus Fischer, Jun 12 2012
LINKS
Tanya Khovanova and Gregory Marton, Archive Labeling Sequences, arXiv:2305.10357 [math.HO], 2023.
FORMULA
From Hieronymus Fischer, Jun 12 2012: (Start)
a(n) = (m+1)*(n+1) - (10^(m+1)-1)/9 + (1/2)*Sum_{j=1..m+1} (floor(n/10^j)*(2n + 2 - (1 + floor(n/10^j))*10^j) - floor(n/10^j + 9/10)*(2n + 2 + ((4/5 - floor(n/10^j + 9/10))*10^j)), where m=floor(log_10(n)).
a(n) = A117804(n+1) - (n+1)*A054640(n) + (1/2)*Sum_{j=1..m+1} ((floor(n/10^j + 9/10)^2 - floor(n/10^j)^2)*10^j - (4/5*floor(n/10^j + 9/10) + floor(n/10^j))*10^j), where m=floor(log_10(n)).
a(10^m-1) = m*10^(m-1) - (10^m-1)/9.
(This is the total number of zeros occurring in all the numbers 1..10^m-1 or numbers with <= m places excluding zero.)
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (1-x^10^j)*x^10^(j+1)/(1-x^10^(j+1)). (End)
EXAMPLE
a(30) = 3 since number of zeros in 302928272625242322212019181716151413121110987654321 is 3. (This example implies offset = 1.)
MATHEMATICA
Table[Count[Flatten[IntegerDigits/@Table[x-n, {n, 0, x-1}]], 0], {x, 110}] (* Harvey P. Dale, Aug 10 2011 *)
PROG
(Haskell)
a061217 n = a061217_list !! (n-1)
a061217_list = scanl1 (+) $ map a055641 [1..]
-- Reinhard Zumkeller, Oct 27 2013
(PARI) a(n) = my(m=logint(n, 10)); (m+1)*(n+1) - (10^(m+1)-1)/9 + (1/2) * sum(j=1, m+1, (n\10^j * (2*n+2 - (1 + n\10^j) * 10 ^ j) - floor(n/10^j+9/10) * (2*n+2 + ((4/5 - floor(n / 10^j + 9 / 10))*10^j)))) \\ adapted from formula by Hieronymus Fischer \\ David A. Corneth, Jan 23 2019
CROSSREFS
Sequence in context: A179051 A324160 A054899 * A102684 A337637 A156821
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 22 2001
EXTENSIONS
Corrected and extended by Patrick De Geest, Jun 05 2001
Offset changed to 1 by Hieronymus Fischer, Jun 12 2012
STATUS
approved

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 June 8 09:36 EDT 2024. Contains 373217 sequences. (Running on oeis4.)