OFFSET
0,4
COMMENTS
If presented in three rows a(3n), a(3n+1) and a(3n+2) each term is the sum of the previous term in the sequence and the partial sum of its row.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Jia Huang, Partially Palindromic Compositions, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 19.
Index entries for linear recurrences with constant coefficients, signature (1,0,2,-1).
FORMULA
a(n) = a(n-1) + 2*a(n-3) - a(n-4) = 7*a(n-3) - 5*a(n-6) + 11*a(n-9) - a(n-12).
G.f.: (1-x^3)/(1-x-2*x^3+x^4).
G.f.: 1/(1-x) + x^3*Q(0)/(2-2*x) , where Q(k) = 1 + 1/(1 - x*(4*k+1 + 2*x^2 - x^3)/( x*(4*k+3 + 2*x^2 - x^3 ) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 11 2013
MATHEMATICA
CoefficientList[Series[(1 - x^3)/(1 - x - 2*x^3 + x^4), {x, 0, 50}], x] (* G. C. Greubel, Mar 10 2017 *)
LinearRecurrence[{1, 0, 2, -1}, {1, 1, 1, 2}, 40] (* Harvey P. Dale, Dec 17 2023 *)
PROG
(PARI) x='x+O(x^50); Vec((1 - x^3)/(1 - x - 2*x^3 + x^4)) \\ G. C. Greubel, Mar 10 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Floor van Lamoen, Nov 04 2005
STATUS
approved