OFFSET
0,3
LINKS
Hsien-Kuei Hwang, S. Janson, T.-H. Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint 2016.
Hsien-Kuei Hwang, S. Janson, T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585.
EXAMPLE
n in init cumulative
n base 3 dgt sum
- ------ ---- ----------
0 0 0 0
1 1 1 1
2 2 2 3
3 10 1 4
4 11 1 5
5 12 1 6
MATHEMATICA
Accumulate[Table[First[IntegerDigits[n, 3]], {n, 0, 80}]] (* Harvey P. Dale, Mar 24 2015 *)
PROG
(PARI) lista(nn) = {s = 0; print1(s, ", "); for (n=1, nn, s += digits(n, 3)[1]; print1(s, ", "); ); } \\ Michel Marcus, Mar 24 2015
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Jonathan Vos Post, Aug 28 2005
EXTENSIONS
Corrected by Harvey P. Dale, Mar 24 2015
STATUS
approved