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!)
A303427 Interleaved Lucas and Fibonacci numbers. 1
2, 0, 1, 1, 3, 1, 4, 2, 7, 3, 11, 5, 18, 8, 29, 13, 47, 21, 76, 34, 123, 55, 199, 89, 322, 144, 521, 233, 843, 377, 1364, 610, 2207, 987, 3571, 1597, 5778, 2584, 9349, 4181, 15127, 6765, 24476, 10946, 39603, 17711, 64079, 28657, 103682, 46368, 167761 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = a(n-2) + a(n-4).
G.f.: -(x+1)*(x^2-2*x+2)/(x^4+x^2-1). - Alois P. Heinz, Apr 23 2018
EXAMPLE
a(8) = Lucas(4) = 7;
a(9) = Fibonacci(4) = 3.
MAPLE
a:= n-> (<<0|1>, <1|1>>^iquo(n, 2, 'r'). <<2*(1-r), 1>>)[1, 1]:
seq(a(n), n=0..60); # Alois P. Heinz, Apr 23 2018
MATHEMATICA
LinearRecurrence[{0, 1, 0, 1}, {2, 0, 1, 1}, 60] (* Vincenzo Librandi, Apr 25 2018 *)
With[{nn=30}, Riffle[LucasL[Range[0, nn]], Fibonacci[Range[0, nn]]]] (* Harvey P. Dale, Feb 25 2021 *)
PROG
(MATLAB)
F = zeros(1, N);
L = ones(1, N);
F(2) = 1;
L(1) = 2
for n = 3:N
F(n) = F(n-1) + F(n-2);
L(n) = L(n-1) + L(n-2);
end
A = F;
B = L;
C=[B; A];
C=C(:)';
C
(Magma) [IsEven(n) select Lucas(n div 2) else Fibonacci((n-1) div 2): n in [0..70]]; // Vincenzo Librandi, Apr 25 2018
(PARI) a(n) = if(n%2, fibonacci(n\2), fibonacci(n/2-1)+fibonacci(n/2+1)); \\ Altug Alkan, Apr 25 2018
CROSSREFS
Sequence in context: A288002 A140129 A029347 * A176076 A058725 A068446
KEYWORD
nonn,easy
AUTHOR
Craig P. White, Apr 23 2018
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 April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)