A383324 a(n) = round(3^n/5).
0, 1, 2, 5, 16, 49, 146, 437, 1312, 3937, 11810, 35429, 106288, 318865, 956594, 2869781, 8609344, 25828033, 77484098, 232452293, 697356880, 2092070641, 6276211922, 18828635765, 56485907296, 169457721889, 508373165666, 1525119496997, 4575358490992, 13726075472977
Offset: 0
Links
- Paolo Xausa, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,3).
Crossrefs
Cf. A178543 (partial sums).
Programs
-
Mathematica
Round[3^Range[0, 30]/5] (* Paolo Xausa, Apr 25 2025 *)
-
Python
def A383324(n): return (3**n+2)//5
Formula
a(n) = floor((3^n+2)/5).
a(n) = 3*a(n-1) - a(n-2) + 3*a(n-3) for n > 2.
G.f.: x*(x - 1)/((3*x - 1)*(x^2 + 1)).
E.g.f.: (exp(5*x) - cos(x) + 2*sin(x))/5. - Stefano Spezia, Apr 24 2025