A133467 a(n) = a(n-1) + 6*a(n-2) for n >= 2, a(0)=1, a(1)=2.
1, 2, 8, 20, 68, 188, 596, 1724, 5300, 15644, 47444, 141308, 425972, 1273820, 3829652, 11472572, 34450484, 103285916, 309988820, 929704316, 2789637236, 8367863132, 25105686548, 75312865340, 225946984628, 677824176668, 2033506084436, 6100451144444, 18301487651060
Offset: 0
Examples
a(2)=8 because we have the walks 0-1-0, 0-1-2, 0-1-3, 0-1-4, 0-4-0, 0-4-1, 0-4-2, 0-4-3. - _Sean A. Irvine_, Jun 07 2025
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Sean A. Irvine, Walks on Graphs.
- Index entries for linear recurrences with constant coefficients, signature (1,6).
Programs
-
Maple
Digits := 50: for n from 0 to 40 do round(.8*3^n+.2*(-2)^n) end do; # Matt C. Anderson, Jul 18 2017
-
Mathematica
LinearRecurrence[{1,6},{1,2},30] (* Harvey P. Dale, Apr 05 2014 *)
-
Sage
from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(1,2,1,6, lambda n: 0); [next(it) for i in range(0,29)] # Zerinvary Lajos, Jul 03 2008
Formula
G.f.: (1+x)/((1+2*x)*(1-3*x)).
a(n) = Sum_{k=0..n+1} A122950(n+1,k)*5^(n+1-k). - Philippe Deléham, Jan 08 2008
a(n) = (4 * 3^n + (-2)^n) / 5. - Werner Schulte, Dec 18 2024
Comments