A340395 a(n) = A340131(A001006(n)).
5, 15, 50, 150, 455, 1365, 4100, 12300, 36905, 110715, 332150, 996450, 2989355, 8968065, 26904200, 80712600, 242137805, 726413415, 2179240250, 6537720750, 19613162255, 58839486765, 176518460300, 529555380900, 1588666142705, 4765998428115, 14297995284350
Offset: 2
Examples
A001006(2) = 2, so a(2) = A340131(2) = 5. A001006(3) = 4, so a(3) = A340131(4) = 15, etc.
Links
- Andrew Howroyd, Table of n, a(n) for n = 2..1000
- Gennady Eremin, Arithmetization of well-formed parenthesis strings. Motzkin Numbers of the Second Kind, arXiv:2012.12675 [math.CO], 2020.
- Index entries for linear recurrences with constant coefficients, signature (3,1,-3).
Crossrefs
Subsequence of A340131.
Programs
-
PARI
Vec(5/(1 - 3*x - x^2 + 3*x^3) + O(x^30)) \\ Andrew Howroyd, Jan 08 2021
Formula
a(n) = 5*3^(n-2*k)*(9^k-1)/8 where k = floor(n/2).
a(n+1) = 3*a(n) for even n >= 2; a(n+1) = 3*a(n)+5 for odd n >= 3.
a(n) = 5*A033113(n-1).
a(n) = (5/8)*(3^n - (-1)^(n-1) - 2).
a(n) = 2*a(n-1) + 3*a(n-2) + 5 for n > 3.
From Stefano Spezia, Jan 06 2021: (Start)
G.f.: 5*x^2/(1 - 3*x - x^2 + 3*x^3).
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3) for n > 4. (End)
Comments