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!)
A226309 a(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) with a(0)=2, a(1)=1, a(2)=5, a(3)=10. 1
2, 1, 5, 10, 20, 37, 77, 154, 308, 613, 1229, 2458, 4916, 9829, 19661, 39322, 78644, 157285, 314573, 629146, 1258292, 2516581, 5033165, 10066330, 20132660, 40265317, 80530637, 161061274, 322122548, 644245093, 1288490189, 2576980378, 5153960756, 10307921509, 20615843021, 41231686042, 82463372084, 164926744165 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
Charles K. Cook and Michael R. Bacon, Some identities for Jacobsthal and Jacobsthal-Lucas numbers satisfying higher order recurrence relations, Annales Mathematicae et Informaticae, 41 (2013) pp. 27-39.
FORMULA
G.f.: (2 - x + 2*x^2 + 2*x^3)/((1+x)*(1-2*x)*(1+x^2)). - Colin Barker, Jun 08 2013
a(n) = (10*(-1)^n + 3*2^(n+3) + 3*(1 - 3*i)*(-i)^n + 3*(1 + 3*i)*i^n)/20 where i=sqrt(-1). - Colin Barker, Jul 10 2015
From G. C. Greubel, Feb 12 2020: (Start)
a(n) = ( 3*2^(n+2) + 5*(-1)^n + 3*cos(n*Pi/2) - 9*sin(n*Pi/2) )/10.
E.g.f.: (5*exp(-x) + 12*exp(2*x) + 3*cos(x) - 9*sin(x))/10. (End)
MAPLE
f:=proc(n) option remember;
if n=0 then 2 elif n=1 then 1 elif n=2 then 5 elif n=3 then 10 else
f(n-1)+f(n-2)+f(n-3)+2*f(n-4); fi; end; [seq(f(n), n=0..40)];
MATHEMATICA
LinearRecurrence[{1, 1, 1, 2}, {2, 1, 5, 10}, 40] (* Harvey P. Dale, Jun 15 2013 *)
CoefficientList[Series[(2-x+2*x^2+2*x^3)/((1+x)*(1-2*x)*(1+x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
Table[If[EvenQ[n], (3*2^(n+2) +5 +3*I^n)/10, (3*2^(n+2) -5 -9*I^(n-1))/10], {n, 0, 40}] (* G. C. Greubel, Feb 12 2020 *)
PROG
(Magma) I:=[2, 1, 5, 10]; [n le 4 select I[n] else Self(n-1)+Self(n-2)+Self(n-3) +2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 19 2013
(Magma) R<x>:=PowerSeriesRing(Rationals(), 38); Coefficients(R!(2-x+2*x^2+2*x^3)/((1+x)*(1-2*x)*(1+x^2))); // Marius A. Burtea, Feb 17 2020
(PARI) Vec((2-x+2*x^2+2*x^3)/((1+x)*(1-2*x)*(1+x^2)) + O(x^50)) \\ Colin Barker, Jul 10 2015
(Sage)
def A226309_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (2-x+2*x^2+2*x^3)/((1+x)*(1-2*x)*(1+x^2)) ).list()
A226309_list(40) # G. C. Greubel, Feb 12 2020
(GAP) a:=[2, 1, 5, 10];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]+2*a[n-4]; od; a; # G. C. Greubel, Feb 12 2020
CROSSREFS
Sequence in context: A035309 A174218 A226308 * A226311 A049948 A222574
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 08 2013
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 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)