login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A303427 Interleaved Lucas and Fibonacci numbers. 0
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

Table of n, a(n) for n=0..50.

Index entries for linear recurrences with constant coefficients, signature (0,1,0,1).

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 *)

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

Cf. A000045, A000032, A302126.

Sequence in context: A288002 A140129 A029347 * A176076 A058725 A068446

Adjacent sequences:  A303424 A303425 A303426 * A303428 A303429 A303430

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 30 11:55 EDT 2020. Contains 337439 sequences. (Running on oeis4.)