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.
%I A094345 #32 Nov 19 2024 03:26:22 %S A094345 0,1,3,4,6,9,11,14,18,19,21,24,26,29,33,36,40,45,47,50,54,57,61,66,70, %T A094345 75,81,82,84,87,89,92,96,99,103,108,110,113,117,120,124,129,133,138, %U A094345 144,147,151,156,160,165,171,176,182,189,191,194,198,201,205,210,214,219 %N A094345 Sum of all digits in ternary expansions of 0, ..., n. %D A094345 Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 94. %H A094345 Amiram Eldar, <a href="/A094345/b094345.txt">Table of n, a(n) for n = 0..10000</a> %H A094345 Jean Coquet, <a href="https://doi.org/10.1016/0022-314X(86)90067-3">Power sums of digital sums</a>, J. Number Theory, Vol. 22, No. 2 (1986), pp. 161-176. %H A094345 P. J. Grabner, P. Kirschenhofer, H. Prodinger and R. F. Tichy, <a href="http://math.sun.ac.za/~hproding/abstract/abs_80.htm">On the moments of the sum-of-digits function</a>, <a href="http://math.sun.ac.za/~hproding/pdffiles/st_andrews.pdf">PDF</a>, Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), pp. 263-271, Kluwer Acad. Publ., Dordrecht, 1993. %H A094345 Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, Vol. 13, No. 4 (2017), Article #47; <a href="https://www.researchgate.net/profile/Hsien-Kuei-Hwang/publication/320642171_Exact_and_Asymptotic_Solutions_of_a_Divide-and-Conquer_Recurrence_Dividing_at_Half_Theory_and_Applications/links/59f9a5be0f7e9b553ec0eaad">ResearchGate link</a>; <a href="http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf">preprint</a>, 2016. %H A094345 J.-L. Mauclaire and Leo Murata, <a href="https://dx.doi.org/10.3792/pjaa.59.274">On q-additive functions. I</a>, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 6 (1983), pp. 274-276. %H A094345 J.-L. Mauclaire and Leo Murata, <a href="https://dx.doi.org/10.3792/pjaa.59.441">On q-additive functions. II</a>, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 9 (1983), pp. 441-444. %H A094345 J. R. Trollope, <a href="http://www.jstor.org/stable/2687954">An explicit expression for binary digital sums</a>, Math. Mag., Vol. 41, No. 1 (1968), pp. 21-25. %F A094345 Asymptotically: a(n) = n*log(n)/log(3) + n*F(log(n)/log(3)) where F is a continuous function of period 1 nowhere differentiable (see Allouche & Shallit book). %t A094345 a[n_] := Plus @@ IntegerDigits[n, 3]; Accumulate @ Array[a, 60, 0] (* _Amiram Eldar_, Dec 09 2021 *) %o A094345 (PARI) s(k,n)=n-(k-1)*sum(m=1,n,valuation(m,k)); %o A094345 a(n)=sum(i=0,n,s(3,i)) %o A094345 (PARI) a(n)= sum(i=1, n, sumdigits(i, 3)); \\ _Ruud H.G. van Tol_, Nov 19 2024 %Y A094345 Cf. A000788, A053735, A231503, A231504, A231505. %K A094345 nonn,base %O A094345 0,3 %A A094345 _Benoit Cloitre_, Jun 08 2004