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 A159342 #20 Sep 08 2022 08:45:43 %S A159342 2,3,6,16,39,89,207,480,1116,2595,6033,14025,32604,75795,176202, %T A159342 409620,952251,2213715,5146263,11963610,27812019,64655100,150304872, %U A159342 349416435,812294661,1888355985,4389895068,10205267895,23724369534,55152467880 %N A159342 Transform of the finite sequence (1, 0, -1, 0, 1, 0, -1) by the T_{0,1} transform (see link). %H A159342 G. C. Greubel, <a href="/A159342/b159342.txt">Table of n, a(n) for n = 0..1000</a> %H A159342 Richard Choulet, <a href="http://www.apmep.asso.fr/IMG/pdf/curtz1.pdf">Curtz-like transformation</a>. %H A159342 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,1). %F A159342 O.g.f.: ((1-x)^2/(1-3*x+2*x^2-x^3))*(1-x^2+x^4+x^6)+((1-x+x^2)/(1-3*x+2*x^2-x^3)). %F A159342 a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3) for n >= 9, with a(0)=2, a(1)=3, a(2)=6, a(3)=16, a(4)=39, a(5)=89, a(6)=207, a(7)=480, a(8)=1116. %p A159342 a(0):=2: a(1):=3:a(2):=6: a(3):=16:a(4):=39:a(5):=89:a(6):=207:a(7):=480:a(8):=1116:for n from 6 to 31 do a(n+3):=3*a(n+2)-2*a(n+1)+a(n):od:seq(a(i),i=0..31); %t A159342 Join[{2, 3, 6, 16, 39, 89}, LinearRecurrence[{3, -2, 1}, {207, 480, 1116}, 50]] (* _G. C. Greubel_, Jun 17 2018 *) %o A159342 (PARI) m=50; v=concat([207, 480, 1116], vector(m-3)); for(n=4, m, v[n] = 3*v[n-1] -2*v[n-2] +v[n-3]); concat([2, 3, 6, 16, 39, 89], v) \\ _G. C. Greubel_, Jun 17 2018 %o A159342 (Magma) I:=[207, 480, 1116]; [2, 3, 6, 16, 39, 89] cat [n le 3 select I[n] else 3*Self(n-1) - 2*Self(n-2) +Self(n-3): n in [1..50]]; // _G. C. Greubel_, Jun 17 2018 %Y A159342 Cf. A135364, A159340, A159341. %K A159342 easy,nonn %O A159342 0,1 %A A159342 _Richard Choulet_, Apr 11 2009