login
A368344
a(n) = Sum_{k=0..n} 3^(n-k) * floor(k/3).
1
0, 0, 0, 1, 4, 13, 41, 125, 377, 1134, 3405, 10218, 30658, 91978, 275938, 827819, 2483462, 7450391, 22351179, 67053543, 201160635, 603481912, 1810445743, 5431337236, 16294011716, 48882035156, 146646105476, 439938316437, 1319814949320, 3959444847969, 11878334543917
OFFSET
0,5
FORMULA
a(n) = a(n-3) + (3^(n-2) - 1)/2.
a(n) = 1/2 * Sum_{k=0..n} floor(3^k/13) = Sum_{k=0..n} floor(3^k/26).
a(n) = 4*a(n-1) - 3*a(n-2) + a(n-3) - 4*a(n-4) + 3*a(n-5).
G.f.: x^3/((1-x) * (1-3*x) * (1-x^3)).
a(n) = (floor(3^(n+1)/26) - floor((n+1)/3))/2.
PROG
(PARI) a(n, m=3, k=3) = (k^(n+1)\(k^m-1)-(n+1)\m)/(k-1);
CROSSREFS
Partial sums of A033139.
Column k=3 of A368343.
Cf. A097137.
Sequence in context: A077284 A070428 A320563 * A268989 A190214 A052529
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Dec 22 2023
STATUS
approved