%I M1061 #60 Sep 08 2022 08:44:33
%S 2,4,7,12,21,38,71,136,265,522,1035,2060,4109,8206,16399,32784,65553,
%T 131090,262163,524308,1048597,2097174,4194327,8388632,16777241,
%U 33554458,67108891,134217756,268435485,536870942,1073741855,2147483680,4294967329,8589934626
%N a(n) = 2^n + n + 1.
%C Binomial transform of (1, 1, 1, 0, 1, 0, 1, 0, 1, ...). - _Gary W. Adamson_, Jul 20 2007
%C Binomial transform of a(n) starts: 2, 6, 17, 47, 129, 355, 985, 2763, 7841, 22499, 65193, 190459, ... - _Wesley Ivan Hurt_, Oct 28 2014
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A005126/b005126.txt">Table of n, a(n) for n = 0..2000</a>
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=921">Encyclopedia of Combinatorial Structures 921</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).
%F G.f.: (2-4*x+x^2)/((1-2*x)*(1-x)^2). - _Simon Plouffe_
%F E.g.f.: exp(x)*(exp(x)+1+x) = U(0) where U(k) = 1 + x/(2^k - 2^k/(x + 1 - x^2*2^(k+1)/(x*2^(k+1) + (k+1)/U(k+1) )));(continued fraction, 3rd kind, 4-step ). - _Sergei N. Gladkovskii_, Dec 01 2012
%p A005126:=-(2-4*z+z**2)/(2*z-1)/(z-1)**2; # Conjectured by _Simon Plouffe_ in his 1992 dissertation
%p g:=z/(1-2*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)+n, n=1..34); # _Zerinvary Lajos_, Jan 11 2009
%t s=2;lst={s};Do[s+=(s-n);AppendTo[lst, Abs[s]], {n, 0, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Oct 10 2008 *)
%t Table[2^n + n + 1, {n, 0, 30}] (* _Wesley Ivan Hurt_, Oct 28 2014 *)
%t LinearRecurrence[{4,-5,2},{2,4,7},40] (* _Harvey P. Dale_, Aug 18 2016 *)
%o (Magma) [2^n+n+1: n in [0..40]]; // _Vincenzo Librandi_, Oct 22 2011
%o (PARI) a(n)=2^n+n+1 \\ _Charles R Greathouse IV_, Sep 24 2015
%Y Essentially the same as row sums of A128715.
%Y Cf. A194455.
%K nonn,easy
%O 0,1
%A _Colin Mallows_
%E More terms from _N. J. A. Sloane_, Sep 28 2007