%I #87 Oct 27 2024 20:28:48
%S 1,-1,1,1,0,-2,-3,1,11,15,-13,-77,-86,144,595,495,-1520,-4810,-2485,
%T 15675,39560,6290,-159105,-324805,87075,1592843,2616757,-2136539,
%U -15726114,-20247800,32296693,152909577,145139491,-417959049,-1460704685,-885536173
%N a(-1) = 1 and g.f. A(x) satisfies A(x) - 1/A(x) = 1/x - 1.
%C The sequence a(n), n >= 1 := 1, 1, 0, -2, -3, 1, 11, 15, -13, -77, ... is the reversion of g.f. for signed Fibonacci numbers A039834 1, -1, 2, -3, 5, -8, 13, -21, 34, -55, ... - _Gennady Eremin_, May 31 2021
%H G. C. Greubel, <a href="/A214649/b214649.txt">Table of n, a(n) for n = -1..2500</a>
%H Gennady Eremin, <a href="https://arxiv.org/abs/2108.10676">Walking in the OEIS: From Motzkin numbers to Fibonacci numbers. The "shadows" of Motzkin numbers</a>, arXiv:2108.10676 [math.CO], 2021.
%F a(n+1) = a(n) - ( a(1) * a(n-1) + a(2) * a(n-2) + ... + a(n-1) * a(1) ) if n > 0.
%F D-finite recurrence (n + 1) * a(n) - (2*n - 1) * a(n-1) + (5*n - 10) * a(n-2) =0 unless n = 1.
%F 0 = a(n)*(+25*a(n+1) - 25*a(n+2) + 20*a(n+3)) + a(n+1)*(+5*a(n+1) - 6*a(n+2) - 5*a(n+3)) + a(n+2)*(+a(n+2) + a(n+3)) if n>=0. - _Michael Somos_, Jan 31 2014
%F G.f.: ( 1 - x + sqrt( 1 - 2*x + 5*x^2 ) ) / (2 * x).
%F G.f. A(x) = (1/x) * (1 - x + x^2 / (1 - x + x^2 / (1 - x + x^2 / ...))).
%F a(n) = -(-1)^n * A007440(n) unless n=0 or n=-1. a(n) = A100223(n+1) unless n=0.
%F a(n) = Sum_{j=0..floor((n+1)/2)} (-1)^(j-1)*binomial(2*j-1, j)*binomial(n-1, 2*j-2)/(2*j-1), n >= 0, a(-1)=1. - _Vladimir Kruchinin_, May 28 2014
%F -1/A(-x) is the o.g.f. for A007440. Lucas(n) = [x^n] (-x*A(-x))^n for n >= 1. - _Peter Bala_, Jun 23 2015
%F From _Gennady Eremin_, May 18 2021: (Start)
%F a(n+1) = A343773(n), n >= 0.
%F Lim_{n->infinity} a(n)/A001006(n) = 0. (End)
%F G.f. A(x) satisfies A(x) - 1/x + 1 = 1/A(x) = x*B(x), where B(x) is the g.f. of A343773. - _Gennady Eremin_, May 29 2021
%e G.f. = x^-1 - 1 + x + x^2 - 2*x^4 - 3*x^5 + x^6 + 11*x^7 + 15*x^8 - 13*x^9 + ...
%p A214649 := n -> `if`(n<2, (-1)^(n-1), simplify(hypergeom([(1-n)/2, 1-n/2], [2], -4))): seq(A214649(n), n=-1..34); # _Peter Luschny_, May 28 2014
%t CoefficientList[Series[(1-x + Sqrt[1-2*x+5*x^2])/2, {x, 0, 50}], x] (* _G. C. Greubel_, Aug 10 2018 *)
%o (PARI) {a(n) = if( n<-1, 0, polcoeff( ( 1 - x + sqrt( 1 - 2*x + 5*x^2 + x^2 * O(x^n) ) ) / ( 2*x ), n))}
%o (PARI) {a(n) = local( A ); if( n<-1, 0, A = 1 / x + O(x^0); forstep( k = -1, n, 2, A = 1 / x - 1 + 1 / A ); polcoeff( A, n ) )};
%o (Maxima)
%o a(n):=if n=-1 then 1 else sum(((-1)^(j-1)*binomial(2*j-1,j)*binomial(n-1,2*j-2))/(2*j-1),j,0,(n+1)/2); /* _Vladimir Kruchinin_, May 28 2014 */
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1-x + Sqrt(1-2*x+5*x^2))/2)); // _G. C. Greubel_, Aug 10 2018
%o (Python)
%o A214649 = [1, -1, 1]
%o for n in range(2, 802):
%o A214649.append( ((2*n-1)*A214649[-1]
%o - 5*(n-2)*A214649[-2])//(n+1) )
%o for n in range(802):
%o print(n-1, A214649[n]) # _Gennady Eremin_, May 18 2021
%Y Cf. A007440, A100223, A000032, A001006, A343773, A039834.
%K sign,easy,changed
%O -1,6
%A _Michael Somos_, Jul 24 2012