%I #31 Sep 08 2022 08:45:40
%S 1,2,7,17,37,77,157,317,637,1277,2557,5117,10237,20477,40957,81917,
%T 163837,327677,655357,1310717,2621437,5242877,10485757,20971517,
%U 41943037,83886077,167772157,335544317,671088637,1342177277,2684354557
%N Expansion of (1 - x + 3*x^2)/((1-x)*(1-2*x)).
%C Binomial transform of 1,1,4,1,4,1,4,1,4,1,4,1,4,1,4,... - _Philippe Deleham_, Jan 05 2009
%H G. C. Greubel, <a href="/A154117/b154117.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).
%F From _Philippe Deléham_, Jan 05 2009: (Start)
%F a(n) = 3*a(n-1) - 2*a(n-2), n > 2.
%F a(n) = 2*a(n-1) + 3, n > 1.
%F a(n) = 5*2^(n-1) - 3, n >= 1. (End)
%F E.g.f.: (1/2)*(3 - 6*exp(x) + 5*exp(2*x)). - _G. C. Greubel_, Sep 02 2016
%t Join[{1}, Table[ 5*2^(n - 1) - 3, {n, 1, 10}]] (* or *) Join[{1, 2, 7}, LinearRecurrence[{3, -2}, {17, 37}, 10]] (* _G. C. Greubel_, Sep 02 2016 *)
%o (Magma) [1] cat [5*2^n-3 : n in [0..30]]; // _Vincenzo Librandi_, Nov 11 2011
%o (PARI) a(n)=if(n, 5<<(n-1)-3, 1) \\ _Charles R Greathouse IV_, Sep 02 2016
%Y Cf. A094373, A000079, A083329, A095121, A131128, A131130.
%K nonn,easy
%O 0,2
%A _Vladimir Joseph Stephan Orlovsky_, Dec 15 2008
%E a(0) added by _Philippe Deléham_, Jan 05 2009