login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122756 Odd-indexed terms, a(n) = 2^n. Even-indexed terms, a(n) = floor(2^n+2^(n-1)). 5
1, 2, 6, 8, 24, 32, 96, 128, 384, 512, 1536, 2048, 6144, 8192, 24576, 32768, 98304, 131072, 393216, 524288, 1572864, 2097152, 6291456, 8388608, 25165824, 33554432, 100663296, 134217728, 402653184, 536870912, 1610612736, 2147483648 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Row sums of triangle A133569. - Gary W. Adamson, Sep 16 2007
LINKS
FORMULA
a(n) = 2*A084221(n-1) for all n >= 1. [Corrected by M. F. Hasler, Feb 09 2018]
a(0)=1, a(1)=2, a(2)=6, a(n)=4*a(n-2) for n>=3. G.f.: (1+2*x+2*x^2)/(1-4*x^2). - Philippe Deléham, Dec 14 2007
a(n-1) = (5*2^n - (-2)^n)/8 for n>1. - Ralf Stephan, Jul 18 2013
a(2*n) = A164908(n), a(2*n+1) = A004171(n). - Philippe Deléham, Mar 20 2014
EXAMPLE
Binary.................Decimal
1............................1
10...........................2
110..........................6
1000.........................8
11000.......................24
100000......................32
1100000.....................96
10000000...................128
110000000..................384
1000000000.................512
11000000000...............1536
100000000000..............2048
1100000000000.............6144
10000000000000............8192, etc. - Philippe Deléham, Mar 20 2014
MATHEMATICA
a[n_] := If[Mod[n, 2] == 0, 2^(n + 1), 2^n + 2^(n + 1)] Table[a[n], {n, 0, 30}]
Join[{1, 2}, LinearRecurrence[{0, 4}, {6, 8}, 40]] (* Vincenzo Librandi, Feb 10 2018 *)
PROG
(PARI) A122756(n)=(3-bittest(n, 0))<<(n-1) \\ M. F. Hasler, Feb 09 2018
(Magma) [1] cat [(5*2^n-(-2)^n)/8: n in [2..40]]; // Vincenzo Librandi, Feb 10 2018
CROSSREFS
Sequence in context: A279732 A260669 A122758 * A193946 A349259 A349260
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 21 2006
EXTENSIONS
Edited by N. J. A. Sloane, Dec 14 2007
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)