login
Expansion of e.g.f. e^(2x)-(1+x)*e^x+x.
10

%I #30 May 15 2021 10:45:01

%S 0,1,1,4,11,26,57,120,247,502,1013,2036,4083,8178,16369,32752,65519,

%T 131054,262125,524268,1048555,2097130,4194281,8388584,16777191,

%U 33554406,67108837,134217700,268435427,536870882,1073741793,2147483616

%N Expansion of e.g.f. e^(2x)-(1+x)*e^x+x.

%C a(n) = A130102(n+1)/2.

%C Partial sums are A130104.

%C Essentially the same as the Euler numbers A000295.

%C a(n) = Sum_{i=1..n} i*2^(n-i) - _Ctibor O. Zizka_, Feb 23 2008

%H Seiichi Manyama, <a href="/A130103/b130103.txt">Table of n, a(n) for n = 0..3321</a>

%H Joerg Arndt and N. J. A. Sloane, <a href="/A278984/a278984.txt">Counting Words that are in "Standard Order"</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).

%F G.f.: x(1-3x+5x^2-2x^3)/((1-x)^2*(1-2x)).

%F E.g.f.: e^(2x)-(1+x)*e^x+x.

%F a(n) = 2^n-n-1+C(1,n)-C(0,n).

%e G.f. = x + x^2 + 4*x^3 + 11*x^4 + 26*x^5 + 57*x^6 + 120*x^7 + 247*x^8 + ...

%p a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+n od: seq(a[n], n=0..30); # _Zerinvary Lajos_, Feb 22 2008

%t Join[{0,1},LinearRecurrence[{4,-5,2},{1,4,11},40]] (* _Harvey P. Dale_, May 16 2014 *)

%t a[ n_] := If[ n < 2, Boole[n == 1], 2^n - (1 + n)]; (* _Michael Somos_, Aug 17 2015 *)

%o (PARI) {a(n) = if( n<2, n==1, 2^n - (1+n))}; /* _Michael Somos_, Aug 17 2015 */

%Y Cf. A000295.

%K easy,nonn

%O 0,4

%A _Paul Barry_, May 07 2007