login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A135851
a(n) = n-1, if n <= 2, otherwise A107458(n-1) + A107458(n-2).
10
-1, 0, 1, 0, 0, 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, 2745, 4023, 5896, 8641, 12664, 18560, 27201, 39865, 58425, 85626, 125491, 183916, 269542, 395033, 578949, 848491, 1243524, 1822473, 2670964, 3914488, 5736961, 8407925
OFFSET
0,9
LINKS
C. K. Fan, Structure of a Hecke algebra quotient, J. Amer. Math. Soc. 10 (1997), no. 1, 139-167. [Page 156, f_n.]
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)
a(n) = A000930(n+2) - 2*A000930(n). - G. C. Greubel, Aug 01 2022
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)))
def A135851(n): return A000930(n+2) -2*A000930(n)
[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