Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Sep 08 2022 08:45:49
%S 0,5,17,43,97,207,429,875,1769,3559,7141,14307,28641,57311,114653,
%T 229339,458713,917463,1834965,3669971,7339985,14680015,29360077,
%U 58720203,117440457,234880967,469761989,939524035,1879048129,3758096319
%N a(n) = 7*2^(n-1) - 2*n - 5.
%H Vincenzo Librandi, <a href="/A168617/b168617.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).
%F a(n) = 2*a(n-1) + 2*n + 1 (with a(1)=0).
%F From _Colin Barker_, Sep 18 2012: (Start)
%F a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
%F G.f.: x^2*(5 - 3*x)/(1 - 4*x + 5*x^2 - 2*x^3). (End)
%F E.g.f.: (1/2)*(3 - (10 + 4*x)*exp(x) + 7*exp(2*x)). - _G. C. Greubel_, Jul 27 2016
%t Table[(7*2^(n-1) - 2*n - 5), {n, 1, 40}] (* _Vincenzo Librandi_, Sep 18 2012 *)
%t LinearRecurrence[{4,-5,2},{0,5,17}, 25] (* _G. C. Greubel_, Jul 27 2016 *)
%o (Magma) I:=[0, 5, 17]; [n le 3 select I[n] else 4*Self(n-1)-5*Self(n-2)+2*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Sep 18 2012
%K nonn,easy
%O 1,2
%A _Vincenzo Librandi_, Dec 01 2009
%E Definition and examples simplified by _Jon E. Schoenfield_, Jun 19 2010