login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = a(n-1) + 2*a(n-2) with n>1, a(0)=2, a(1)=7.
4

%I #40 Oct 24 2024 04:18:58

%S 2,7,11,25,47,97,191,385,767,1537,3071,6145,12287,24577,49151,98305,

%T 196607,393217,786431,1572865,3145727,6291457,12582911,25165825,

%U 50331647,100663297,201326591,402653185,805306367,1610612737,3221225471,6442450945,12884901887

%N a(n) = a(n-1) + 2*a(n-2) with n>1, a(0)=2, a(1)=7.

%D B. Satyanarayana and K. S. Prasad, Discrete Mathematics and Graph Theory, PHI Learning Pvt. Ltd. (Eastern Economy Edition), 2009, p. 73 (problem 3.3).

%H Bruno Berselli, <a href="/A201630/b201630.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 G.f.: (2+5*x)/((1+x)*(1-2*x)).

%F a(n) = 3*2^n - (-1)^n.

%F a(n) = 7 + 2*Sum_{i=0..n-2} a(i) for n>0.

%F a(n) = A097581(A042948(n+1)).

%F a(n+2)-a(n) = a(n+1)+a(n) = A005010(n).

%t LinearRecurrence[{1, 2}, {2,7}, 33]

%o (PARI) v=vector(33); v[1]=2; v[2]=7; for(i=3, #v, v[i]=v[i-1]+2*v[i-2]); v

%o (Magma) [n le 2 select 5*n-3 else Self(n-1)+2*Self(n-2): n in [1..33]];

%o (Maxima) a[0]:2$ a[1]:7$ a[n]:=a[n-1]+2*a[n-2]$ makelist(a[n], n, 0, 32);

%Y Cf. A001045, A005010, A042948, A097581.

%K nonn,easy

%O 0,1

%A _Bruno Berselli_, Dec 03 2011