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!)
A094345 Sum of all digits in ternary expansions of 0, ..., n. 5
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, 75, 81, 82, 84, 87, 89, 92, 96, 99, 103, 108, 110, 113, 117, 120, 124, 129, 133, 138, 144, 147, 151, 156, 160, 165, 171, 176, 182, 189, 191, 194, 198, 201, 205, 210, 214, 219 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
REFERENCES
Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 94.
LINKS
Jean Coquet, Power sums of digital sums, J. Number Theory, Vol. 22, No. 2 (1986), pp. 161-176.
P. J. Grabner, P. Kirschenhofer, H. Prodinger and R. F. Tichy, On the moments of the sum-of-digits function, PDF, Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), pp. 263-271, Kluwer Acad. Publ., Dordrecht, 1993.
Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, Vol. 13, No. 4 (2017), Article #47; ResearchGate link; preprint, 2016.
J.-L. Mauclaire and Leo Murata, On q-additive functions. I, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 6 (1983), pp. 274-276.
J.-L. Mauclaire and Leo Murata, On q-additive functions. II, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 9 (1983), pp. 441-444.
J. R. Trollope, An explicit expression for binary digital sums, Math. Mag., Vol. 41, No. 1 (1968), pp. 21-25.
FORMULA
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).
MATHEMATICA
a[n_] := Plus @@ IntegerDigits[n, 3]; Accumulate @ Array[a, 60, 0] (* Amiram Eldar, Dec 09 2021 *)
PROG
(PARI) s(k, n)=n-(k-1)*sum(m=1, n, valuation(m, k));
a(n)=sum(i=0, n, s(3, i))
CROSSREFS
Sequence in context: A184795 A285412 A105527 * A243302 A301654 A289233
KEYWORD
nonn,base
AUTHOR
Benoit Cloitre, Jun 08 2004
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 April 18 15:48 EDT 2024. Contains 371780 sequences. (Running on oeis4.)