OFFSET
0,4
COMMENTS
Shifted version of the array denoted rB(0,2) in A132382, whose e.g.f. is exp(x)(1-x)^2. Taking the derivative gives the e.g.f. of this sequence. - Tom Copeland, Dec 02 2013
The Fibonacci numbers are generated by the series x/(1 - x - x^2). - T. D. Noe, Dec 04 2013
Absolute value of expression f(k)*f(k+1) - f(k-1)*f(k+2) where f(1)=1, f(2)=n. Sign is alternately +1 and -1. - Carmine Suriano, Jan 28 2014 [Can anybody clarify what is meant here? - Joerg Arndt, Nov 24 2014]
Carmine's formula is a special case related to 4 consecutive terms of a Fibonacci sequence. A generalization of this formula is |a(n)| = |f(k+i)*f(k+j) - f(k)*f(k+i+j)|/F(i)*F(j), where f denotes a Fibonacci sequence with the initial values 1 and n, and F denotes the original Fibonacci sequence A000045. The same results can be obtained with the simpler formula |a(n)| = |f(k+1)^2 - f(k)^2 - f(k+1)*f(k)|. Everything said so far is also valid for Fibonacci sequences f with the initial values f(1) = n - 2, f(2) = 2*n - 3. - Klaus Purath, Jun 27 2022
a(n) is the total number of dollars won when using the Martingale method (bet $1, if win then continue to bet $1, if lose then double next bet) for n trials of a wager with exactly one loss, n-1 wins. For the case with exactly one win, n-1 losses, see A070313. - Max Winnick, Jun 28 2022
Numbers m such that 4*m+5 is a square b^2, where b = 2*n -1, for m = a(n). - Klaus Purath, Jul 23 2022
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
J. J. Heed and L Kelly, An interesting sequence of Fibonacci sequence generators, Fibonacci Quarterly, 13 (1975), pp. 29-30.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n+2) = (n+1)*a(n+1) - (n+2)*a(n).
G.f.: (x^2+2*x-1)/(1-x)^3.
E.g.f.: exp(x)*(x^2-1).
a(n) = - A188652(2*n) for n > 0. - Reinhard Zumkeller, Apr 13 2011
G.f.: -1 - x + x^2*G(0) where G(k) = 1 + x*(k+1)*(k+4)/(1 - 1/(1 + (k+1)*(k+4)/G(k+1)); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 16 2012
E.g.f.: G(0) where G(k) = -1 - x^2/(1 - 1/(1 + x*(k+1)/G(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 17 2012
a(n+2) = A028387(n). - Michael B. Porter, Sep 26 2018
From Klaus Purath, Aug 25 2022: (Start)
a(2*n) = n*(a(n+1) - a(n-1)) -1.
a(2*n+1) = (2*n+1)*(a(n+1) - a(n)) - 1.
a(n+2) = a(n) + 4*n + 2.
a(n) = A152015(n)/n, n != 0.
(a(n+k) - a(n-k))/(2*k) = 2*n-1, for any k.
(End)
For n > 1, 1/a(n) = Sum_{k>=1} F(k)/n^(k+1), where F(n) = A000045(n). - Diego Rattaggi, Nov 01 2022
a(n) = a(1-n) for all n in Z. - Michael Somos, Mar 23 2023
EXAMPLE
G.f. = -1 - x + x^2 + 5*x^3 + 11*x^4 + 19*x^5 + 29*x^6 + 41*x^7 + ... - Michael Somos, Mar 23 2023
MATHEMATICA
Table[n^2 - n - 1, {n, 0, 50}] (* Ron Knott, Oct 27 2010 *)
LinearRecurrence[{3, -3, 1}, {-1, -1, 1}, 60] (* Harvey P. Dale, Jul 05 2021 *)
PROG
(PARI) a(n)=n^2-n-1 \\ Charles R Greathouse IV, Jan 12 2012
(Haskell)
a165900 n = n * (n - 1) - 1 -- Reinhard Zumkeller, Jul 29 2012
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Sep 29 2009
EXTENSIONS
a(22) corrected by Reinhard Zumkeller, Apr 13 2011
STATUS
approved