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

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099942 Start with 1, then alternately double or add 2. 1
1, 2, 4, 8, 10, 20, 22, 44, 46, 92, 94, 188, 190, 380, 382, 764, 766, 1532, 1534, 3068, 3070, 6140, 6142, 12284, 12286, 24572, 24574, 49148, 49150, 98300, 98302, 196604, 196606, 393212, 393214, 786428, 786430, 1572860, 1572862, 3145724, 3145726 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

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

FORMULA

a(0)=1; for n > 0, a(n) = a(n-1)*(1 + n mod 2) + 2*((n+1) mod 2).

G.f.: (2*x^3 + x^2 + 2*x + 1)/(2*x^4 - 3*x^2 + 1)

3*2^ceiling(n/2) + (-1)^n - 3. - Ralf Stephan, Dec 04 2004

a(2*n) = A033484(n).

a(n-1) + a(n) = A061776(n) for n > 0.

MATHEMATICA

LinearRecurrence[{0, 3, 0, -2}, {1, 2, 4, 8}, 50] (* Harvey P. Dale, May 03 2016 *)

PROG

(PARI) print1(a=1, ", "); for(n=1, 20, print1(a=2*a, ", ", a=a+2, ", "))

(MAGMA) [3*2^Ceiling(n/2) + (-1)^n - 3: n in [0..50]]; // Vincenzo Librandi, Aug 17 2011

CROSSREFS

Cf. A033484, A061776, A075427, A083416.

Sequence in context: A261931 A173816 A185400 * A033092 A177909 A259386

Adjacent sequences:  A099939 A099940 A099941 * A099943 A099944 A099945

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Nov 12 2004

EXTENSIONS

Edited and extended by Klaus Brockhaus, Nov 13 2004

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 3 07:27 EST 2016. Contains 278698 sequences.