OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
T. Crilly, Interleaving Integer Sequences, The Mathematical Gazette, Vol. 91, No. 520 (Mar., 2007), pp. 27-33.
Wikipedia, Interleave sequence
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1).
FORMULA
a(0) = 0; a(1) = 2; a(2) = 1; a(3) = 1; a(n) = a(n-2) + a(n-4), n >= 4.
G.f.: x*(2 - x)*(1 + x) / (1 - x^2 - x^4). - Colin Barker, Apr 02 2018
a(0) = 0; a(1) = 2; a(2n) = (a(2n-1) + a(2n-2))/2; a(2n+1) = a(2n) + 2*a(2n-2), n >= 1. - Daniel Forgues, Jul 29 2018
EXAMPLE
a(10) = Fibonacci(5) = 5;
a(11) = Lucas(5) = 11.
MAPLE
a:= n-> (<<0|1>, <1|1>>^iquo(n, 2, 'r'). <<2*r, 1>>)[1, 1]:
seq(a(n), n=0..60); # Alois P. Heinz, Apr 23 2018
MATHEMATICA
Table[{Fibonacci[n], LucasL[n]}, {n, 0, 25}] // Flatten
LinearRecurrence[{0, 1, 0, 1}, {0, 2, 1, 1}, 52]
Flatten@ Array[{LucasL@#, Fibonacci@#} &, 26, 0] (* or *)
CoefficientList[Series[(x^3 - x^2 - 2x)/(x^4 + x^2 - 1), {x, 0, 51}], x] (* Robert G. Wilson v, Apr 02 2018 *)
PROG
(PARI) concat(0, Vec(x*(2 - x)*(1 + x) / (1 - x^2 - x^4) + O(x^60))) \\ Colin Barker, Apr 02 2018
(GAP) Flat(List([1..25], n->[Fibonacci(n), Lucas(1, -1, n)[2]])); # Muniru A Asiru, Apr 02 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Patrick D McLean, Apr 01 2018
EXTENSIONS
More terms from Colin Barker, Apr 02 2018
STATUS
approved