login
A089649
a(1)=1, a(2)=2, a(n) = a(n-1) + a(floor((n+1)/3)).
3
1, 2, 3, 4, 6, 8, 10, 13, 16, 19, 23, 27, 31, 37, 43, 49, 57, 65, 73, 83, 93, 103, 116, 129, 142, 158, 174, 190, 209, 228, 247, 270, 293, 316, 343, 370, 397, 428, 459, 490, 527, 564, 601, 644, 687, 730, 779, 828, 877, 934, 991, 1048, 1113, 1178, 1243, 1316, 1389
OFFSET
1,2
COMMENTS
Partial sums of the sequence: a(1)=1, a(1), a(1), a(1), a(2), a(2), a(2), a(3), a(3), ... each term repeated 3 times.
LINKS
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[Quotient[#2 + 1, 3]]]] &, {1, 2}, Range[3, 57]] (* Ivan Neretin, Nov 25 2016 *)
PROG
(PARI) a(n)=if(n<2, 1, a(n-1)+a(floor((n+1)/3)))
CROSSREFS
Sequence in context: A025694 A022796 A008748 * A049700 A002984 A109965
KEYWORD
nonn
AUTHOR
Philippe Deléham, Jan 02 2004
STATUS
approved