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!)
A281362 a(0) = 1, a(1) = 2; for n>1, a(n) = a(n-1) + a(n-2) + floor(n/2). 2
1, 2, 4, 7, 13, 22, 38, 63, 105, 172, 282, 459, 747, 1212, 1966, 3185, 5159, 8352, 13520, 21881, 35411, 57302, 92724, 150037, 242773, 392822, 635608, 1028443, 1664065, 2692522, 4356602, 7049139, 11405757, 18454912, 29860686, 48315615, 78176319, 126491952 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
From Colin Barker, Jan 27 2017: (Start)
a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5) for n>4.
G.f.: (1 - x^2 + x^4) / ((1 - x)^2*(1 + x)*(1 - x - x^2)).
(End)
0 = 3 + a(n)*(-4 - 2*a(n) - a(n+1) + 6*a(n+2) - a(n+3)) + a(n+1)*(-1 + a(n+1) + a(n+2) - 2*a(n+3)) + a(n+2)*(+11 - 5*a(n+2) + 3*a(n+3)) + a(n+3)*(-6) for all n in Z. - Michael Somos, Jan 27 2017
EXAMPLE
G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 13*x^4 + 22*x^5 + 38*x^6 + 63*x^7 + ...
MATHEMATICA
CoefficientList[Series[(1-x^2+x^4)/((1-x)^2*(1+x)*(1-x-x^2)), {x, 0, 50}], x] (* G. C. Greubel, Jul 29 2018 *)
PROG
(PARI) Vec((1 - x^2 + x^4) / ((1 - x)^2*(1 + x)*(1 - x - x^2)) + O(x^50))
(PARI) {a(n) = my(m=n); if( n<0, m=-1-n); polcoeff( (1 - x^2 + x^4) / ((1 - x - x^2 + x^3) * (1 - (-1)^(n<0)*x - x^2)) + x * O(x^m), m)}; /* Michael Somos, Jan 27 2017 */
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^2+x^4)/((1-x)^2*(1+x)*(1-x-x^2)))); // G. C. Greubel, Jul 29 2018
CROSSREFS
Sequence in context: A085489 A101268 A188920 * A319111 A128768 A235607
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 27 2017, based on a comment in A215004 from Alex Ratushnyak, Jul 31 2012.
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 March 28 16:12 EDT 2024. Contains 371254 sequences. (Running on oeis4.)