The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A152035 Expansion of g.f. (1-2*x^2)/(1-2*x-2*x^2). 3
1, 2, 4, 12, 32, 88, 240, 656, 1792, 4896, 13376, 36544, 99840, 272768, 745216, 2035968, 5562368, 15196672, 41518080, 113429504, 309895168, 846649344, 2313089024, 6319476736, 17265131520, 47169216512, 128868696064, 352075825152, 961889042432, 2627929735168, 7179637555200, 19615134580736 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Essentially same as A028860. - Philippe Deléham, Sep 21 2009
LINKS
FORMULA
a(n) = 2*(a(n-1) + a(n-2)) for n >= 3. - Peter Luschny, Jan 03 2019
MAPLE
a := proc(n) option remember;
`if`(n < 3, [1, 2, 4][n+1], 2*(a(n-1) + a(n-2))) end:
seq(a(n), n=0..31); # Peter Luschny, Jan 03 2019
MATHEMATICA
f[n_] = 2^n*Product[(1 + 2*Cos[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; Table[FullSimplify[ExpandAll[f[n]]], {n, 0, 15}]
CoefficientList[Series[(1-2x^2)/(1-2x-2x^2), {x, 0, 40}], x] (* Harvey P. Dale, Sep 23 2014 *)
LinearRecurrence[{2, 2}, {1, 2, 4}, 40] (* Harvey P. Dale, May 12 2023 *)
PROG
(Magma) [1] cat [n le 2 select 2^n else 2*(Self(n-1) +Self(n-2)): n in [1..30]]; // G. C. Greubel, Sep 20 2023
(SageMath)
@CachedFunction
def a(n): # a = A152035
if n<3: return (1, 2, 4)[n]
else: return 2*(a(n-1) + a(n-2))
[a(n) for n in range(31)] # G. C. Greubel, Sep 20 2023
CROSSREFS
Cf. A028860. Row sums of A322942.
Sequence in context: A181329 A293007 A028860 * A026151 A025178 A231295
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Nov 20 2008
EXTENSIONS
Edited by N. J. A. Sloane, Apr 11 2009, based on comments from Philippe Deléham and R. J. Mathar
More terms from Philippe Deléham, Sep 21 2009
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 June 14 02:27 EDT 2024. Contains 373392 sequences. (Running on oeis4.)