login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123208 Start with 1, then alternately add 2 or double. 6
1, 3, 6, 8, 16, 18, 36, 38, 76, 78, 156, 158, 316, 318, 636, 638, 1276, 1278, 2556, 2558, 5116, 5118, 10236, 10238, 20476, 20478, 40956, 40958, 81916, 81918, 163836, 163838, 327676, 327678, 655356, 655358, 1310716, 1310718, 2621436, 2621438 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0,3,0,-2).

FORMULA

a(2n) = 5*2^n - 4; a(2n+1) = 5*2^n - 2 (n >= 0). - Emeric Deutsch, Oct 10 2006

a(n+1) = (1+(-1)^n)*(a(n)+2)/2 + (1-(-1)^n)*a(n), with a(0)=1. - Paolo P. Lava, Nov 19 2008

a(n) = 3*a(n-2) - 2*a(n-4). - Colin Barker, Sep 10 2012

G.f.: (1+3*x+3*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)). - Colin Barker, Sep 10 2012

a(2n) = A048487(n); a(2n+1) = A051633(n). - Philippe Deléham, Apr 15 2013

EXAMPLE

1, 1+2=3, 3*2=6, 6+2=8, 8*2=16, ...

MAPLE

a:=proc(n) if n mod 2 = 0 then 5*2^(n/2)-4 else 5*2^((n-1)/2)-2 fi end: seq(a(n), n=0..45); # Emeric Deutsch, Oct 10 2006

MATHEMATICA

nxt[{a_, b_}]:={b+2, 2(b+2)}; Rest[Flatten[NestList[nxt, {1, 1}, 20]]] (* or *) LinearRecurrence[{0, 3, 0, -2}, {1, 3, 6, 8}, 40] (* Harvey P. Dale, Oct 10 2012 *)

CoefficientList[Series[(1 + 3 x + 3 x^2 - x^3) / ((1 - x) (1 + x) (1 - 2 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 25 2013 *)

PROG

(MAGMA) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x+3*x^2-x^3)/((1-x^2)*(1-2*x^2)))); // Vincenzo Librandi, Jun 25 2013

CROSSREFS

Sequence in context: A320687 A039567 A032912 * A179652 A253855 A298860

Adjacent sequences:  A123205 A123206 A123207 * A123209 A123210 A123211

KEYWORD

easy,nonn

AUTHOR

Philippe Deléham, Oct 04 2006

EXTENSIONS

More terms from Emeric Deutsch, Oct 10 2006

STATUS

approved

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 October 15 12:31 EDT 2019. Contains 328026 sequences. (Running on oeis4.)