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.

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

This page as a plain text file.
%I A361751 #70 Apr 15 2023 06:27:21
%S A361751 1,3,6,10,15,21,28,36,45,65,87,111,137,165,195,227,261,297,335,375,
%T A361751 417,461,507,555,605,657,711,767,825,885,947,1011,1077,1145,1215,1287,
%U A361751 1361,1437,1515,1595,1677,1761,1847,1935,2025,2117,2211,2307,2405,2505,2607,2711,2817,2925
%N A361751 a(n) is the number of decimal digits in A098129(n) and A300517(n).
%H A361751 Winston de Greef, <a href="/A361751/b361751.txt">Table of n, a(n) for n = 1..10000</a>
%F A361751 a(n) = A055642(A098129(n)).
%F A361751 From _Alois P. Heinz_, Mar 23 2023: (Start)
%F A361751 a(n) = Sum_{j=1..n} j*A055642(j).
%F A361751 a(n) = Sum_{j=1..n} A110803(j). (End)
%F A361751 a(n) = Sum_{k=0..floor(log_10(n))} (n*(n+1) - 10^k*(10^k-1))/2. - _Andrew Howroyd_, Mar 24 2023
%F A361751 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 A361751 For n = 4, a(4) = 10, because A098129(4) = 1223334444.
%e A361751 For n = 10, a(10) = 65, because A098129(10) = 12233344445555566666677777778888888899999999910101010101010101010.
%p A361751 a:= proc(n) a(n):= `if`(n<1, 0, a(n-1)+n*length(n)) end:
%p A361751 seq(a(n), n=1..100);  # _Alois P. Heinz_, Mar 23 2023
%o A361751 (PARI)
%o A361751 a(n) = {my(x=logint(n,10)+1);x*n*(n+1)/2 - ((100^x-1)/99 - (10^x-1)/9)/2}
%o A361751 vector(100, i, a(i))
%o A361751 (Python)
%o A361751 def a(n):
%o A361751     d = len(str(n))
%o A361751     m = 10**d
%o A361751     return d*n*(n+1)//2 - ((m-11)*m + 10)//198
%o A361751 print([a(n) for n in range(1, 55)]) # _Michael S. Branicky_, Mar 24 2023 modified Mar 29 2023
%o A361751 (Python) # faster for generating initial segment of sequence
%o A361751 from itertools import count, islice
%o A361751 def agen(s=0): yield from (s:=s+n*len(str(n)) for n in count(1))
%o A361751 print(list(islice(agen(), 60))) # _Michael S. Branicky_, Mar 24 2023
%Y A361751 Cf. A055642, A098129, A300517.
%Y A361751 Partial sums of A110803.
%K A361751 nonn,base,easy
%O A361751 1,2
%A A361751 _David Cleaver_, Mar 23 2023