login
Expansion of g.f.: (1+x^2)/(1-2*x).
12

%I #51 Feb 21 2023 10:38:03

%S 1,2,5,10,20,40,80,160,320,640,1280,2560,5120,10240,20480,40960,81920,

%T 163840,327680,655360,1310720,2621440,5242880,10485760,20971520,

%U 41943040,83886080,167772160,335544320,671088640,1342177280,2684354560,5368709120,10737418240

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

%C Associated with a math magic problem.

%C Elements are the sums of consecutive pairs of elements of A084214.

%H G. C. Greubel, <a href="/A084215/b084215.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = Sum_{k=0..n} 2^(n-k)*binomial(1, k/2)*(1+(-1)^k)/2. - _Paul Barry_, Oct 15 2004

%F a(n) = A020714(n-2), n > 1. - _R. J. Mathar_, Dec 19 2008

%F From _Gary W. Adamson_, Aug 26 2011: (Start)

%F a(n) is the sum of top row terms of M^n, M is an infinite square production matrix as follows:

%F 1, 1, 0, 0, 0, 0, ...

%F 1, 1, 1, 0, 0, 0, ...

%F 0, 0, 0, 0, 0, 0, ...

%F 0, 0, 0, 0, 0, 0, ...

%F ...

%F E.g.: a(4) = 20 = (8 + 8 + 4) since the top row of M^4 = (8, 8, 4, 0, 0, 0, ...). (End)

%F a(n) = floor(2^(n-2)*5). - _Taher Jamshidi_, Sep 15 2012

%F a(n) = 2*a(n-1) for n >= 3, a(0) = 1, a(1) = 2, a(2) = 5. - _Philippe Deléham_, Mar 13 2013

%F E.g.f.: (5*exp(2*x) - 2*x - 1)/4. - _Stefano Spezia_, Feb 20 2023

%t Join[{1, 2, a = 5}, Table[a = 2*a, {n,0,40}]] (* _Vladimir Joseph Stephan Orlovsky_, Jun 09 2011 *)

%t Table[Int[2^(n-2)*5],{n,0,40}] (* _Taher Jamshidi_, Sep 15 2012 *)

%t CoefficientList[Series[(1 + x^2)/(1 - 2 x), {x, 0, 30}], x] (* _G. C. Greubel_, Oct 08 2018 *)

%o (PARI) x='x+O('x^30); Vec((1+x^2)/(1-2*x)) \\ _G. C. Greubel_, Oct 08 2018

%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x^2)/(1-2*x))); // _G. C. Greubel_, Oct 08 2018

%Y Cf. A020714, A060816, A084214.

%K easy,nonn

%O 0,2

%A _Paul Barry_, May 19 2003