OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
N. Gogin and A. Mylläri, Padovan-like sequences and Bell polynomials, Proceedings of Applications of Computer Algebra ACA, 2013.
Michael D. Hirschhorn, Non-trivial intertwined second-order recurrence relations, Fibonacci Quart. 43 (2005), no. 4, 316-325. See L_n.
Index entries for linear recurrences with constant coefficients, signature (0,-1,1).
FORMULA
a(n) = Sum_{k=0..floor(n/2)} (-1)^(n-k)*binomial(k, n-2*k). - Paul Barry, Jun 24 2005
From Alois P. Heinz, Jun 20 2008: (Start)
a(n) = term (1,1) in matrix [0,1,0; -1,0,1; 1,0,0]^n.
a(n) = A000930 (-3-n). (End)
a(-n) = A078012(n). - Michael Somos, May 03 2011
From Michael Somos, Jan 08 2014: (Start)
a(-n) = A135851(n+2).
a(n)^2 - a(n-1)*a(n+1) = A135851(n+5). (End)
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x^2*(4*k+1 - x )/( x^2*(4*k+3 - x ) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
EXAMPLE
G.f. = 1 - x^2 + x^3 + x^4 - 2*x^5 + 3*x^7 - 2*x^8 - 3*x^9 + 5*x^10 + x^11 + ...
MAPLE
a:= n-> (<<0|1|0>, <-1|0|1>, <1|0|0>>^n)[1, 1]:
seq(a(n), n=0..50); # Alois P. Heinz, Jun 20 2008
MATHEMATICA
a[ n_] := If[ n >= 0, SeriesCoefficient[ 1 / (1 + x^2 - x^3), {x, 0, n}], SeriesCoefficient[ x^3 / (1 - x - x^3), {x, 0, -n}]] (* Michael Somos, Jan 08 2014 *)
PROG
(PARI) {a(n) = if( n<0, polcoeff( x^3 / (1 - x - x^3) + x * O(x^-n), -n), polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^n), n))} /* Michael Somos, Jan 08 2014 */
(Magma) I:=[1, 0, -1]; [n le 3 select I[n] else -Self(n-2) +Self(n-3): n in [1..70]]; // G. C. Greubel, Mar 28 2024
(SageMath) [sum((-1)^(n+k)*binomial(k, n-2*k) for k in range(1+n//2)) for n in range(71)] # G. C. Greubel, Mar 28 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved