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 A192395 #43 Jul 11 2023 08:50:50 %S A192395 0,0,0,1,2,2,1,2,8,17,22,22,33,78,156,233,298,442,833,1546,2464,3553, %T A192395 5390,9230,16161,26358,40404,62713,103298,174290,285505,451154,712184, %U A192395 1156145,1910086,3122374,5005089,7987806,12907980,21090185,34362394,55428010 %N A192395 a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) + 2*a(n-4) starting with a(0..3) = 0, 0, 0, 1. %H A192395 Vincenzo Librandi, <a href="/A192395/b192395.txt">Table of n, a(n) for n = 0..1000</a> %H A192395 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,1,2). %F A192395 From _R. J. Mathar_, Jul 14 2011: (Start) %F A192395 G.f.: x^3/((1-x+2*x^2)*(1-x-x^2)). %F A192395 a(n) = (A000045(n) - A107920(n))/3. (End) %p A192395 a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <2|1|-2|2>>^n)[1,4]: %p A192395 seq(a(n), n=0..45); # _Alois P. Heinz_, Jul 11 2023 %t A192395 LinearRecurrence[{2,-2,1,2},{0,0,0,1},100] (* _Vincenzo Librandi_, Nov 25 2011 *) %o A192395 (Magma) I:=[0,0,0,1]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-2)+Self(n-3)+2*Self(n-4): n in [1..50]]; // _Vincenzo Librandi_, Nov 25 2011 %o A192395 (SageMath) %o A192395 @CachedFunction %o A192395 def a(n): # a = A192395 %o A192395 if (n<4): return n//3 %o A192395 else: return 2*a(n-1) - 2*a(n-2) + a(n-3) + 2*a(n-4) %o A192395 [a(n) for n in range(51)] # _G. C. Greubel_, Jul 10 2023 %Y A192395 Cf. A000045, A107920. %K A192395 nonn,easy %O A192395 0,5 %A A192395 _Paul Curtz_, Jun 29 2011