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.
%I A079162 #22 Jun 04 2025 23:20:53 %S A079162 0,1,2,4,10,18,46,82,210,374,958,1706,4370,7782,19934,35498,90930, %T A079162 161926,414782,738634,1892050,3369318,8630686,15369322,39369330, %U A079162 70107974,179585278,319801226,819187730,1458790182,3736768094,6654348458,17045465010,30354161926,77753788862 %N A079162 a(n) = 5*a(n-2) - 2*a(n-4), with initial terms 0,1,2,4. %H A079162 Andrew Howroyd, <a href="/A079162/b079162.txt">Table of n, a(n) for n = 0..1000</a> %H A079162 Sean A. Irvine, <a href="https://oeis.org/wiki/User:Sean_A._Irvine/Walks_on_Graphs#5_vertices">Walks on Graphs</a>. %H A079162 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,5,0,-2). %F A079162 Also a(n) = a(n-1) + 2a(n-2) if n is odd, else a(n) = 2a(n-1) + a(n-2). %F A079162 a(2n) = 2*A005824(2n), a(2n+1) = A052913(n) = A005824(2n) + A005824(2n+1). %F A079162 G.f.: x*(1+2*x-x^2)/(1-5*x^2+2*x^4). %t A079162 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}] %t A079162 LinearRecurrence[{0,5,0,-2},{0,1,2,4},40] (* _Harvey P. Dale_, Jul 05 2022 *) %Y A079162 Cf. A005824, A052913. %K A079162 nonn,easy %O A079162 0,3 %A A079162 _Robert G. Wilson v_, Dec 29 2002 %E A079162 Corrected the g.f. and index in formula with A052913 _R. J. Mathar_, Apr 01 2009, May 02 2009 %E A079162 a(31) onwards from _Andrew Howroyd_, Mar 19 2025