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
1, 3, 6, 10, 15, 21, 28, 36, 45, 65, 87, 111, 137, 165, 195, 227, 261, 297, 335, 375, 417, 461, 507, 555, 605, 657, 711, 767, 825, 885, 947, 1011, 1077, 1145, 1215, 1287, 1361, 1437, 1515, 1595, 1677, 1761, 1847, 1935, 2025, 2117, 2211, 2307, 2405, 2505, 2607, 2711, 2817, 2925 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A055642(A098129(n)).
From Alois P. Heinz, Mar 23 2023: (Start)
a(n) = Sum_{j=1..n} j*A055642(j).
a(n) = Sum_{j=1..n} A110803(j). (End)
a(n) = Sum_{k=0..floor(log_10(n))} (n*(n+1) - 10^k*(10^k-1))/2. - Andrew Howroyd, Mar 24 2023
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
EXAMPLE
For n = 4, a(4) = 10, because A098129(4) = 1223334444.
For n = 10, a(10) = 65, because A098129(10) = 12233344445555566666677777778888888899999999910101010101010101010.
MAPLE
a:= proc(n) a(n):= `if`(n<1, 0, a(n-1)+n*length(n)) end:
seq(a(n), n=1..100); # Alois P. Heinz, Mar 23 2023
PROG
(PARI)
a(n) = {my(x=logint(n, 10)+1); x*n*(n+1)/2 - ((100^x-1)/99 - (10^x-1)/9)/2}
vector(100, i, a(i))
(Python)
def a(n):
d = len(str(n))
m = 10**d
return d*n*(n+1)//2 - ((m-11)*m + 10)//198
print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Mar 24 2023 modified Mar 29 2023
(Python) # faster for generating initial segment of sequence
from itertools import count, islice
def agen(s=0): yield from (s:=s+n*len(str(n)) for n in count(1))
print(list(islice(agen(), 60))) # Michael S. Branicky, Mar 24 2023
CROSSREFS
Partial sums of A110803.
Sequence in context: A165145 A046489 A277209 * A089717 A050760 A075057
KEYWORD
nonn,base,easy
AUTHOR
David Cleaver, Mar 23 2023
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 August 15 10:38 EDT 2024. Contains 375173 sequences. (Running on oeis4.)