cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A109499 Number of closed walks of length n on the complete graph on 5 nodes from a given node.

Original entry on oeis.org

1, 0, 4, 12, 52, 204, 820, 3276, 13108, 52428, 209716, 838860, 3355444, 13421772, 53687092, 214748364, 858993460, 3435973836, 13743895348, 54975581388, 219902325556, 879609302220, 3518437208884, 14073748835532
Offset: 0

Views

Author

Mitch Harris, Jun 30 2005

Keywords

Crossrefs

Cf. A108020 (bisection), A109502.

Programs

  • GAP
    a:=[1,0];; for n in [3..30] do a[n]:=3*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Mar 23 2019
  • Magma
    [(4^n + 4*(-1)^n)/5: n in [0..30]]; // Vincenzo Librandi, Aug 12 2011
    
  • Mathematica
    CoefficientList[Series[(1-3*x)/(1-3*x-4*x^2), {x,0,30}], x] (* or *) LinearRecurrence[{3,4}, {1,0}, 30] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    a(n)=(4^n+4*(-1)^n)/5 \\ Charles R Greathouse IV, Oct 01 2012
    
  • Sage
    [(4^n+4*(-1)^n)/5 for n in (0..30)] # G. C. Greubel, Mar 23 2019
    

Formula

G.f.: (1 - 3*x)/(1 - 3*x - 4*x^2).
a(n) = (4^n + 4*(-1)^n)/5.
a(n+1) = 4*A015521(n). - Paul Curtz, Nov 01 2009
a(n) = 3*a(n-1) + 4*a(n-1). - G. C. Greubel, Dec 30 2017
a(n) = A108020((n - 1) / 2) = 'ccc...c' (n digits) in base 16, for odd n. - Georg Fischer, Mar 23 2019
E.g.f.: (exp(4*x) + 4*exp(-x))/5. - G. C. Greubel, Mar 23 2019

Extensions

Corrected by Franklin T. Adams-Watters, Sep 18 2006