OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = abs( f(Fibonacci(n)) - Fibonacci(f(n)) ), where f(n) = n-2 if (n mod 3) = 0, f(n) = n+2 if (n mod 3) = 1, otherwise f(n) = n; or f(n) = - f(n-1) - f(n-2) + 3*(n-1), with f(1) = 3 and f(2) = 2.
MATHEMATICA
f[n_]= If[Mod[n, 3]==0, n-2, If[Mod[n, 3]==1, n+2, n]];
a[n_]:= Abs[f[Fibonacci[n]] - Fibonacci[f[n]]];
Table[a[n], {n, 50}]
PROG
(Magma)
f:= func< n | n mod 3 eq 0 select n-2 else n mod 3 eq 1 select n+2 else n >;
A103114:= func< n | Abs( f(Fibonacci(n)) - Fibonacci(f(n)) ) >;
[A103114(n): n in [1..60]]; // G. C. Greubel, Dec 06 2022
(SageMath)
def f(n):
if (n%3)==0: return n-2
elif (n%3)==1: return n+2
else: return n
def A103114(n): return abs( f(fibonacci(n)) - fibonacci(f(n)) )
[A103114(n) for n in range(1, 60)] # G. C. Greubel, Dec 06 2022
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Mar 16 2005
EXTENSIONS
Edited by G. C. Greubel, Dec 06 2022
STATUS
approved