Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Dec 05 2020 23:23:17
%S 0,1,3,6,10,11,12,13,14,15,17,19,21,23,25,28,31,34,37,40,44,48,52,56,
%T 60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,
%U 83,84,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121
%N Cumulative sum of initial digits of (n base 5).
%H A. Cobham, <a href="https://doi.org/10.1007/BF01706087">Uniform Tag Sequences</a>, Mathematical Systems Theory, 6 (1972), 164-192.
%F a(n) = Sum_{i=0..n} A000030(A007091(n)).
%F a(n) = Sum_{i=0..n} first-digit(i base 4) where (i base 5) = A007091(i);
%F A007091(0)=0, A007091(i) = 10*A007091(i/5) if i == 0 (mod 5), A007091(i) = A007091(i-1) + 1 otherwise.
%F a(n) = Sum_{i=1..n} floor(n / 5^(floor(log_5(n)))).
%F a(n+1) = a(n) + first-digit-of((n+1) (base 5)).
%e n in init cumulative
%e n base 5 dgt sum
%e - ------ ---- ----------
%e 0 0 0 0
%e 1 1 1 1
%e 2 2 2 3
%e 3 3 3 6
%e 4 4 4 10
%e 5 10 1 11
%o (PARI) a(n) = if (n, sum(k=1, n, digits(k, 5)[1]), 0); \\ _Michel Marcus_, Dec 13 2017
%Y Cf. A000030, A007091, A109453, A339255 (first differences).
%K base,easy,nonn
%O 0,3
%A _Jonathan Vos Post_, Aug 28 2005