OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
M. Harned, A Fibonacci Related Sequence, Girls' Angle Bulletin, Vol. 10, No. 4 (2017), 23-26.
Index entries for linear recurrences with constant coefficients, signature (3,1,-5,-1,1).
FORMULA
a(n) = F(n)*(1 + F(n-1)) where F = A000045 (the Fibonacci sequence).
From Colin Barker, May 18 2017: (Start)
G.f.: x*(1 - x - 3*x^2) / ((1 + x)*(1 - 3*x + x^2)*(1 - x - x^2)).
a(n) = 3*a(n-1) + a(n-2) - 5*a(n-3) - a(n-4) + a(n-5) for n>5.
(End)
EXAMPLE
F(4) = 9 since 1, 4, 5, 9 and 3, 3, 6, 9 are the first four terms of distinct nondecreasing sequences of positive integers that satisfy the Fibonacci recurrence relation and there are not two such sequences that have a number less than 9 as their 4th term.
MATHEMATICA
LinearRecurrence[{3, 1, -5, -1, 1}, {1, 2, 4, 9, 20}, 32] (* or *)
Rest@ CoefficientList[Series[x (1 - x - 3 x^2)/((1 + x) (1 - 3 x + x^2) (1 - x - x^2)), {x, 0, 32}], x] (* Michael De Vlieger, May 18 2017 *)
PROG
(PARI) Vec(x*(1 - x - 3*x^2) / ((1 + x)*(1 - 3*x + x^2)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, May 18 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Milena Harned, May 17 2017
STATUS
approved