Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #33 Sep 08 2022 08:45:50
%S 20,41,83,167,335,671,1343,2687,5375,10751,21503,43007,86015,172031,
%T 344063,688127,1376255,2752511,5505023,11010047,22020095,44040191,
%U 88080383,176160767,352321535,704643071,1409286143,2818572287
%N a(n) = 21*2^n - 1.
%H Vincenzo Librandi, <a href="/A171389/b171389.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 a(n+1) = 2*a(n) + 1.
%F G.f.: (20-19*x)/((1-x)*(1-2*x)). - _Vincenzo Librandi_, Jul 06 2012
%F a(n) = 3*a(n-1) - 2*a(n-2). - _Vincenzo Librandi_, Jul 06 2012
%F a(n) + a(n-1)^2 = (a(n-1) + 1)^2. - _Vincenzo Librandi_, Jun 11 2014
%p A171389:=n->21*2^n-1; seq(A171389(n), n=0..40); # _Wesley Ivan Hurt_, Jun 11 2014
%t CoefficientList[Series[(20-19*x)/((1-x)*(1-2*x)),{x,0,40}],x] (* _Vincenzo Librandi_, Jul 06 2012 *)
%o (BASIC) for j = 0 to 30 : print str$((21*2^j)-1)+", "; : next j [_Jeremy Gardiner_, Oct 23 2011]
%o (Magma) I:=[20, 41]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Jul 06 2012
%Y Cf. A086224, A175805.
%K nonn,easy
%O 0,1
%A _Vincenzo Librandi_, Dec 07 2009
%E Edited by _Jon E. Schoenfield_, Jun 23 2010
%E Offset changed to 0 and first formula corrected by _Jeremy Gardiner_, Oct 23 2011