OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,0,0,0,0,0,1,-1,-1).
FORMULA
a(n) = f(Fibonacci(n+1)), where f(n) = n-2 if (n mod 3) = 0, f(n) = n+2 if (n mod 3) = 1, otherwise f(n) = n.
a(n) = A113655(Fibonacci(n+1)).
G.f.: (3-4*x^2-4*x^3+2*x^4+2*x^5+2*x^6-4*x^7-x^8+2*x^9) / ((1-x)*(1+x)*(1+x^2)*(1-x-x^2)*(1+x^4)). - Colin Barker, Dec 11 2012
a(n) = (1 + 3*(-1)^n)/4 + Fibonacci(n+1) + (3/2)*(-1)^floor(n/2) * (n mod 2) + A014017(n) + A014017(n-1) - A014017(n-2). - G. C. Greubel, Dec 09 2022
MATHEMATICA
f[n_]:= If[Mod[n, 3]==0, n-2, If[Mod[n, 3]==1, n+2, n]]; (* f=A113655 *)
Table[f[Fibonacci[n+1]], {n, 0, 50}]
PROG
(Magma)
A113655:= func< n | 6*Floor((n+2)/3) -(n+2) >;
[A102905(n): n in [0..50]]; // G. C. Greubel, Dec 09 2022
(SageMath)
def A113655(n): return 6*((n+2)//3) -(n+2)
[A102905(n) for n in range(51)] # G. C. Greubel, Dec 09 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 16 2005
EXTENSIONS
Edited by G. C. Greubel, Dec 09 2022
STATUS
approved