OFFSET
0,9
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
C. K. Fan, Structure of a Hecke algebra quotient, J. Amer. Math. Soc. 10 (1997), no. 1, 139-167. [Page 156, f_n.]
Index entries for linear recurrences with constant coefficients, signature (1,0,1).
FORMULA
From R. J. Mathar, Jul 26 2010: (Start)
a(n) = +a(n-1) +a(n-3).
a(n) = A078012(n-2), for n>=2.
G.f.: (-1 + x + x^2) / (1 - x - x^3). (End)
From Michael Somos, Jan 08 2014: (Start)
a(n) = A077961(2-n) for all n in Z.
a(n)^2 - a(n-1)*a(n+1) = A077961(n-5). (End)
EXAMPLE
G.f. = -1 + x^2 + x^5 + x^6 + x^7 + 2*x^8 + 3*x^9 + 4*x^10 + 6*x^11 + ...
MATHEMATICA
LinearRecurrence[{1, 0, 1}, {-1, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2012 *)
a[ n_] := If[ n < 3, SeriesCoefficient[ 1 / (1 + x^2 - x^3), {x, 0, 2 - n}], SeriesCoefficient[ x^5 / (1 - x - x^3), {x, 0, n}]]; (* Michael Somos, Jan 08 2014 *)
PROG
(Haskell)
a135851 n = a135851_list !! n
a135851_list = -1 : 0 : 1 : zipWith (+) a135851_list (drop 2 a135851_list)
-- Reinhard Zumkeller, Mar 23 2012
(PARI) {a(n) = if( n<3, polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^(2-n)), 2-n), polcoeff( x^5 / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, Jan 08 2014 */
(Magma) [n le 3 select n-2 else Self(n-1) + Self(n-3): n in [1..61]]; // G. C. Greubel, Aug 01 2022
(SageMath)
def A000930(n): return sum(binomial(n-2*j, j) for j in (0..(n//3)))
[A135851(n) for n in (0..60)] # G. C. Greubel, Aug 01 2022
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Mar 08 2008
STATUS
approved