login
a(n) - 2*a(n-1) = period 2: repeat [3, 0] for n > 0, a(0)=5, a(1)=13.
1

%I #28 Feb 09 2019 07:25:35

%S 5,13,26,55,110,223,446,895,1790,3583,7166,14335,28670,57343,114686,

%T 229375,458750,917503,1835006,3670015,7340030,14680063,29360126,

%U 58720255,117440510,234881023,469762046,939524095,1879048190,3758096383,7516192766

%N a(n) - 2*a(n-1) = period 2: repeat [3, 0] for n > 0, a(0)=5, a(1)=13.

%C a(n) mod 9 = period 6: repeat [5, 4, 8, 1, 2, 7]. See A177883(n+2).

%C a(n+1) mod 10 = period 4: repeat [3, 6, 5, 0].

%H Colin Barker, <a href="/A322417/b322417.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = A166920(n) + A166920(n+1) + A166920(n+2) for n >= 2.

%F a(n) = a(n-2) + 21*2^(n-2) for n >= 2.

%F a(n) = a(n-1) + A321483(n) for n > 0.

%F From _Colin Barker_, Dec 07 2018: (Start)

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

%F a(n) = 7*2^n - 2 for n even.

%F a(n) = 7*2^n - 1 for n odd.

%F a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 2.

%F (End)

%F a(2*n+1) = A206372(n). a(2*n+2) = 2*A206372(n) for n > 0.

%t a[0] = 5; a[1] = 13; a[n_] := a[n] = a[n - 2] + 21*2^(n - 2); Array[a, 30, 0] (* _Amiram Eldar_, Dec 07 2018 *)

%t LinearRecurrence[{2, 1, -2}, {5, 13, 26}, 31] (* _Jean-François Alcover_, Jan 28 2019 *)

%o (GAP) a:=[13,26];; for n in [3..30] do a[n]:=a[n-2]+21*2^(n-2); od; Concatenation([5],a); # _Muniru A Asiru_, Dec 07 2018

%o (PARI) Vec((5 + 3*x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)) + O(x^40)) \\ _Colin Barker_, Dec 07 2018

%Y Cf. A166920, A175805, A206372, A321483.

%Y Cf. A177883.

%K nonn,easy

%O 0,1

%A _Paul Curtz_, Dec 07 2018

%E First formula corrected by _Jean-François Alcover_, Feb 01 2019