login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117615 a(0)=0, a(1)=1, a(n)=4a(n-1)+2 for n =3,5,7,..., a(n)=4a(n-1) for n =2,4,6,.... 0

%I

%S 0,1,4,18,72,290,1160,4642,18568,74274,297096,1188386,4753544,

%T 19014178,76056712,304226850,1216907400,4867629602,19470518408,

%U 77882073634,311528294536,1246113178146,4984452712584,19937810850338,79751243401352

%N a(0)=0, a(1)=1, a(n)=4a(n-1)+2 for n =3,5,7,..., a(n)=4a(n-1) for n =2,4,6,....

%D L. Rosenfeld, Nuclear Forces, section II, Interscience, New York, 1948, p 202

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

%F G.f.: x*(1+x^2) / ( (x-1)*(4*x-1)*(1+x) ). - _R. J. Mathar_, Nov 07 2015

%F a(n) = 3*a(n-1)+4*a(n-2)+2,n>=3. - _R. J. Mathar_, Nov 07 2015

%p a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 1 then 4*a(n-1)+2 else 4*a(n-1) fi end: seq(a(n),n=0..24);

%t b[0] := 0 b[1] := 1 b[n_?EvenQ] := b[n] = 4*b[n - 1] b[n_?OddQ] := b[n] = 4*b[n - 1] + 2 a = Table[b[n], {n, 0, 25}]

%t nxt[{n_,a_}]:={n+1,If[EvenQ[n],4a+2,4a]}; Join[{0},Transpose[NestList[nxt,{1,1},30]][[2]]] (* or *) Join[{0},LinearRecurrence[{4,1,-4},{1,4,18},30]] (* _Harvey P. Dale_, Nov 28 2013 *)

%K nonn,easy

%O 0,3

%A _Roger L. Bagula_, Apr 07 2006

%E Edited by _N. J. A. Sloane_, Apr 16 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 00:42 EDT 2020. Contains 337276 sequences. (Running on oeis4.)