OFFSET
0,3
COMMENTS
This is the transform of the Fibonacci numbers under the inverse of the signed permutations matrix (see A094587).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..250
Index entries for linear recurrences with constant coefficients, signature (2,1,-2,-1).
FORMULA
G.f. : x*(1 + x - 2*x^2)/(1 - x - x^2)^2.
a(n) = A101220(n, 0, n) - Ross La Haye, Jan 28 2005
a(n) = A109754(n, n). - Ross La Haye, Aug 20 2005
a(n) = (sin(c*n)*i - n*sin(c*(n - 1)))/(i^n*sqrt(5/4)) where c = arccos(i/2). - Peter Luschny, May 16 2022
MATHEMATICA
CoefficientList[Series[x (1+x-2x^2)/(1-x-x^2)^2, {x, 0, 40}], x] (* Harvey P. Dale, Apr 16 2011 *)
PROG
(Magma) [n*Fibonacci(n-1)+Fibonacci(n): n in [0..60]]; // Vincenzo Librandi, Apr 23 2011
(Haskell)
a094588 n = a094588_list !! n
a094588_list = 0 : zipWith (+) (tail a000045_list)
(zipWith (*) [1..] a000045_list)
-- Reinhard Zumkeller, Mar 04 2012
(PARI) Vec((1+x-2*x^2)/(1-x-x^2)^2+O(x^99)) \\ Charles R Greathouse IV, Mar 04, 2012
(Julia) # The function 'fibrec' is defined in A354044.
function A094588(n)
n == 0 && return BigInt(0)
a, b = fibrec(n - 1)
a*n + b
end
println([A094588(n) for n in 0:34]) # Peter Luschny, May 16 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, May 13 2004
STATUS
approved