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!)
A361751 a(n) is the number of decimal digits in A098129(n) and A300517(n). 3

%I #70 Apr 15 2023 06:27:21

%S 1,3,6,10,15,21,28,36,45,65,87,111,137,165,195,227,261,297,335,375,

%T 417,461,507,555,605,657,711,767,825,885,947,1011,1077,1145,1215,1287,

%U 1361,1437,1515,1595,1677,1761,1847,1935,2025,2117,2211,2307,2405,2505,2607,2711,2817,2925

%N a(n) is the number of decimal digits in A098129(n) and A300517(n).

%H Winston de Greef, <a href="/A361751/b361751.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A055642(A098129(n)).

%F From _Alois P. Heinz_, Mar 23 2023: (Start)

%F a(n) = Sum_{j=1..n} j*A055642(j).

%F a(n) = Sum_{j=1..n} A110803(j). (End)

%F a(n) = Sum_{k=0..floor(log_10(n))} (n*(n+1) - 10^k*(10^k-1))/2. - _Andrew Howroyd_, Mar 24 2023

%F a(n) = k*n*(n+1)/2 - ((100^k-1)/99 - (10^k-1)/9)/2, where k = floor(log_10(n))+1. - _David Cleaver_, Mar 25 2023

%e For n = 4, a(4) = 10, because A098129(4) = 1223334444.

%e For n = 10, a(10) = 65, because A098129(10) = 12233344445555566666677777778888888899999999910101010101010101010.

%p a:= proc(n) a(n):= `if`(n<1, 0, a(n-1)+n*length(n)) end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Mar 23 2023

%o (PARI)

%o a(n) = {my(x=logint(n,10)+1);x*n*(n+1)/2 - ((100^x-1)/99 - (10^x-1)/9)/2}

%o vector(100, i, a(i))

%o (Python)

%o def a(n):

%o d = len(str(n))

%o m = 10**d

%o return d*n*(n+1)//2 - ((m-11)*m + 10)//198

%o print([a(n) for n in range(1, 55)]) # _Michael S. Branicky_, Mar 24 2023 modified Mar 29 2023

%o (Python) # faster for generating initial segment of sequence

%o from itertools import count, islice

%o def agen(s=0): yield from (s:=s+n*len(str(n)) for n in count(1))

%o print(list(islice(agen(), 60))) # _Michael S. Branicky_, Mar 24 2023

%Y Cf. A055642, A098129, A300517.

%Y Partial sums of A110803.

%K nonn,base,easy

%O 1,2

%A _David Cleaver_, Mar 23 2023

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 17 09:58 EDT 2024. Contains 373444 sequences. (Running on oeis4.)