The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A152163 a(n) = a(n-1)+a(n-2), n>1 ; a(0)=1, a(1)=-1. 8
1, -1, 0, -1, -1, -2, -3, -5, -8, -13, -21, -34, -55, -89, -144, -233, -377, -610, -987, -1597, -2584, -4181, -6765, -10946, -17711, -28657, -46368, -75025, -121393, -196418, -317811, -514229, -832040, -1346269, -2178309, -3524578, -5702887 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
FORMULA
G.f.: (1-2*x)/(1-x-x^2).
a(n) = Sum_{k, 0<=k<=n}A147703(n,k)*(-2)^k.
a(n) = -Fibonacci(n-2) for n >= 2, and for all n if A000045 is extended in the natural way to negative indices; see also A039834. [Extended by M. F. Hasler, May 10 2017]
a(n) = (-1)^n*A039834(n-2). - R. J. Mathar, Mar 22 2011
G.f.: (1/(1-Q(0))-1)*(1-2*x)/x where Q(k)=1 - x^k/(1 - x/( x - x^k/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 23 2013
G.f.: 2 - 2/(Q(0)+1) where Q(k) = 1 - 2*x/(1 - x/(x - 1/Q(k+1) )); (continued fraction ). - Sergei N. Gladkovskii, Apr 05 2013
a(n) = A000045(n+1)-2*A000045(n). - R. J. Mathar, Jun 26 2013
G.f.: 1 - x - x^3*Q(0)/2, where Q(k) = 1 + 1/(1 - x*(6*k+1 + x)/(x*(6*k+4 + x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 02 2014
G.f.: 1+1/x - x - Q(0)/x, where Q(k) = 1 + x^2 - x^3 - k*x*(1+x^2) - x^2*( x*(k+2)-1)*( k*x -1)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Jan 13 2014
MATHEMATICA
LinearRecurrence[{1, 1}, {1, -1}, 40] (* Harvey P. Dale, Oct 09 2012 *)
PROG
(Magma) I:=[1, -1]; [n le 2 select I[n] else Self(n-1)+Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 23 2013
(PARI) a(n)=-fibonacci(n-2) \\ M. F. Hasler, May 10 2017
(Sage)
def A152163():
a, b = True, False
x, y = 1, 1
while True:
yield x if a else -x
x, y = y, x - y
a, b = b, a
a = A152163()
print([next(a) for _ in range(50)]) # Peter Luschny, Mar 19 2020
CROSSREFS
Cf. A000045.
Sequence in context: A248740 A185357 A132636 * A039834 A236191 A333378
KEYWORD
easy,sign
AUTHOR
Philippe Deléham, Nov 27 2008
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 May 13 23:15 EDT 2024. Contains 372524 sequences. (Running on oeis4.)