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!)
A016029 a(1) = a(2) = 1, a(2n + 1) = 2*a(2n) and a(2n) = 2*a(2n - 1) + (-1)^n. 4
1, 1, 2, 5, 10, 19, 38, 77, 154, 307, 614, 1229, 2458, 4915, 9830, 19661, 39322, 78643, 157286, 314573, 629146, 1258291, 2516582, 5033165, 10066330, 20132659, 40265318, 80530637, 161061274, 322122547, 644245094 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Row sums of Riordan array ((1+x^3)/(1-x^4), x/(1-x)). - Paul Barry, Oct 08 2007
LINKS
FORMULA
From Ralf Stephan, Jan 12 2005: (Start)
a(n) = (1/10)*(3*2^n + 3*(-1)^floor(n/2) - (-1)^floor((n+1)/2)).
G.f.: x*(1-x+x^2)/((1-2*x)*(1+x^2)). (End)
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3). - Paul Curtz, Dec 18 2007
From G. C. Greubel, Jul 08 2022: (Start)
a(n) = round( 3*2^(n-1)/5 ).
E.g.f.: (1/10)*(3*exp(2*x) + 4*sin(x) + 2*cos(x) - 5). (End)
MATHEMATICA
LinearRecurrence[{2, -1, 2}, {1, 1, 2}, 31] (* Ray Chandler, Sep 23 2015 *)
PROG
(Magma) [Round(3*2^(n-1)/5): n in [1..41]]; // G. C. Greubel, Jul 08 2022
(SageMath) [(1/10)*(3*2^n + 2*i^n*(((n+1)%2) - 2*i*(n%2))) for n in (1..40)] # G. C. Greubel, Jul 08 2022
CROSSREFS
Sequence in context: A263366 A068035 A304973 * A018327 A285571 A000099
KEYWORD
nonn
AUTHOR
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 May 16 20:35 EDT 2024. Contains 372555 sequences. (Running on oeis4.)