login
Inverse binomial transform of a math magic problem.
17

%I #50 Aug 18 2024 08:40:07

%S 1,1,4,6,14,26,54,106,214,426,854,1706,3414,6826,13654,27306,54614,

%T 109226,218454,436906,873814,1747626,3495254,6990506,13981014,

%U 27962026,55924054,111848106,223696214,447392426,894784854,1789569706,3579139414

%N Inverse binomial transform of a math magic problem.

%C Inverse binomial transform of A060816.

%H Vincenzo Librandi, <a href="/A084214/b084214.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 (1,2).

%F a(n) = (5*2^n - 3*0^n + 4*(-1)^n)/6.

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

%F E.g.f.: (5*exp(2*x) - 3*exp(0) + 4*exp(-x))/6.

%F From _Paul Barry_, May 04 2004: (Start)

%F The binomial transform of a(n+1) is A020989(n).

%F a(n) = A001045(n-1) + A001045(n+1) - 0^n/2. (End)

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

%F a(n) = a(n-1) + 2*a(n-2) for n > 2. - _Klaus Brockhaus_, Dec 01 2009

%F From _Yuchun Ji_, Mar 18 2019: (Start)

%F a(n+1) = Sum_{i=0..n} a(i) + 1 - (-1)^n, a(0)=1.

%F a(n) = A000975(n-3)*10 + 5 + (-1)^(n-3), a(0)=1, a(1)=1, a(2)=4. (End)

%F a(n) = A081254(n) + (n-1 mod 2). - _Kevin Ryde_, Dec 20 2023

%p A084214 := proc(n)

%p (5*2^n - 3*0^n + 4*(-1)^n)/6 ;

%p end proc:

%p seq(A084214(n),n=0..60) ; # _R. J. Mathar_, Aug 18 2024

%t f[n_]:=2/(n+1);x=3;Table[x=f[x];Numerator[x],{n,0,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 12 2010 *)

%t LinearRecurrence[{1,2},{1,1,4},50] (* _Harvey P. Dale_, Mar 05 2021 *)

%o (Magma) [(5*2^n-3*0^n+4*(-1)^n)/6: n in [0..35]]; // _Vincenzo Librandi_, Jun 15 2011

%o (Haskell)

%o a084214 n = a084214_list !! n

%o a084214_list = 1 : xs where

%o xs = 1 : 4 : zipWith (+) (map (* 2) xs) (tail xs)

%o -- _Reinhard Zumkeller_, Aug 01 2011

%o (PARI) a(n) = 5<<(n-1)\3 + bitnegimply(1,n); \\ _Kevin Ryde_, Dec 20 2023

%Y Cf. A000975, A001045, A020989, A048654, A060816, A081254.

%K easy,nonn

%O 0,3

%A _Paul Barry_, May 19 2003