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 A319172 #31 Dec 14 2024 07:33:26 %S A319172 1,2,5,12,27,62,143,328,753,1730,3973,9124,20955,48126,110527,253840, %T A319172 582977,1338882,3074917,7061948,16218683,37248318,85545615,196466648, %U A319172 451211249,1036265410,2379918501,5465792852,12552905275,28829382142 %N A319172 a(n) = 2*(a(n-1) + a(n-3)) - a(n-4), with a(0) = 1, a(1) = 2, a(2) = 5 and a(3) = 12. %C A319172 The growth factor for large n (i.e., a(n)/a(n-1)) is (1 + sqrt(3) + sqrt(2*sqrt(3))) = A319129. %H A319172 Colin Barker, <a href="/A319172/b319172.txt">Table of n, a(n) for n = 0..1000</a> %H A319172 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,2,-1). %F A319172 Limit_{n -> inf} a(n)/a(n-1) = (1 + sqrt(3) + sqrt(2*sqrt(3)))/2 = A319129. %F A319172 G.f.: (1 + x^2) / (1 - 2*x - 2*x^3 + x^4). - _Colin Barker_, Sep 13 2018 %p A319172 f:= gfun:-rectoproc({a(n) = 2*(a(n-1)+a(n-3))-a(n-4), a(0) = 1, a(1) = 2, a(2) = 5, a(3) = 12},a(n),remember): %p A319172 map(f, [$0..40]); # _Robert Israel_, Sep 12 2018 %t A319172 LinearRecurrence[{2, 0, 2, -1}, {1, 2, 5, 12}, 30] (* _Vincenzo Librandi_, Sep 29 2018 *) %t A319172 CoefficientList[Series[(1 + x^2) / (1 - 2*x - 2*x^3 + x^4), {x, 0, 30}], x] (* _Stefano Spezia_, Sep 29 2018 *) %o A319172 (GAP) a:=[1,2,5,12];; for n in [5..30] do a[n]:=2*(a[n-1]+a[n-3])-a[n-4]; od; a; # _Muniru A Asiru_, Sep 12 2018 %o A319172 (PARI) Vec((1 + x^2) / (1 - 2*x - 2*x^3 + x^4) + O(x^40)) \\ _Colin Barker_, Sep 13 2018 %o A319172 (Magma) I:=[1,2,5,12]; [n le 4 select I[n] else 2*(Self(n-1) + Self(n-3)) - Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, Sep 29 2018 %Y A319172 Cf. A319129. %K A319172 nonn,easy %O A319172 0,2 %A A319172 _A.H.M. Smeets_, Sep 12 2018