OFFSET
1,3
COMMENTS
Essentially the same as A141015. - R. J. Mathar, Sep 14 2008
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,1).
FORMULA
a(n) = Sum_{k=1..n} b(k)*a(n - k) for n >= 1, where b(n) = b(n-2) + b(n-3) for n >= 3 with b(0) = 0 and b(1) = b(2) = 1. [That is, b(n) = A000931(n+4) = A078027(n+6) = A134816(n) = A182097(n+1). - Petros Hadjicostas, Aug 09 2020]
From Colin Barker, Feb 01 2012: (Start)
a(n) = a(n-1) + 2*a(n-2) + a(n-3), n > 4.
G.f.: x*(1 - x^2 - x^3)/(1 - x - 2*x^2 - x^3). (End)
a(n) = A000930(2*n - 3) for n >= 3. - Georg Fischer, Mar 23 2019
MATHEMATICA
(* b = A000931 *)
b[0]=0; b[1]=1; b[2]=1; b[n_]:= b[n]= b[n-2] + b[n-3];
a[1]=1; a[n_]:= a[n]= Sum[b[k]*a[n-k], {k, n-1}];
Table[a[n], {n, 35}]
(* or *)
LinearRecurrence[{1, 2, 1}, {1, 1, 2, 4}, 31] (* Georg Fischer, Mar 23 2019 *)
PROG
(PARI) x='x+O('x^35); Vec(x*(1-x^2-x^3)/(1-x-2*x^2-x^3)) \\ G. C. Greubel, Jun 05 2018
(Magma) m:=35; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1-x^2-x^3)/(1-x-2*x^2-x^3))); // G. C. Greubel, Jun 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 07 2008
STATUS
approved