%I #17 May 27 2024 07:17:19
%S 0,2,1,1,8,5,3,34,21,13,144,89,55,610,377,233,2584,1597,987,10946,
%T 6765,4181,46368,28657,17711,196418,121393,75025,832040,514229,317811,
%U 3524578,2178309,1346269,14930352,9227465,5702887,63245986,39088169
%N Let f(n) = n+2 if n == 1 mod 3, = n if n == 2 mod 3, = n-2 if n == 0 mod 3; then a(n) = Fibonacci(f(n)).
%C In other words, split the Fibonacci numbers into groups of three and reverse each group.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,4,0,0,1)
%F G.f.: x*(-2-x-x^2-x^4+x^5) / ( (x^2+x-1)*(x^4-x^3+2*x^2+x+1) ). - _R. J. Mathar_, Mar 08 2011
%t fib[n_Integer?Positive] := fib[n] = fib[n - 1] + fib[n - 2] fib[0] = 0; fib[1] = 1 f[n_] = If[Mod[n, 3] == 1, n + 2, If[Mod[n, 3] == 0, n - 2, n]] a = Table[fib[f[n]], {n, 1, 200}]
%t Flatten[Join[{0},Reverse/@Partition[Fibonacci[Range[42]],3]]] (* or *) Join[{0},LinearRecurrence[{0,0,4,0,0,1},{2,1,1,8,5,3},40]] (* _Harvey P. Dale_, Mar 26 2015 *)
%K nonn
%O 0,2
%A _Roger L. Bagula_, Mar 16 2005
%E Edited by _N. J. A. Sloane_, Nov 12 2006