A079162 a(n) = 5*a(n-2) - 2*a(n-4), with initial terms 0,1,2,4.
0, 1, 2, 4, 10, 18, 46, 82, 210, 374, 958, 1706, 4370, 7782, 19934, 35498, 90930, 161926, 414782, 738634, 1892050, 3369318, 8630686, 15369322, 39369330, 70107974, 179585278, 319801226, 819187730, 1458790182, 3736768094, 6654348458, 17045465010, 30354161926, 77753788862
Offset: 0
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
- Sean A. Irvine, Walks on Graphs.
- Index entries for linear recurrences with constant coefficients, signature (0,5,0,-2).
Programs
-
Mathematica
a[0] = 0; a[1] = 1; a[n_] := a[n] = If[ OddQ[n], a[n - 1] + 2a[n - 2], 2a[n - 1] + a[n - 2]]; Table[a[n], {n, 0, 30}] LinearRecurrence[{0,5,0,-2},{0,1,2,4},40] (* Harvey P. Dale, Jul 05 2022 *)
Formula
Extensions
Corrected the g.f. and index in formula with A052913 R. J. Mathar, Apr 01 2009, May 02 2009
a(31) onwards from Andrew Howroyd, Mar 19 2025