OFFSET
0,9
COMMENTS
Numbers n > 7 such that a(n) = Fibonacci(n) - 2*n are 8, 9, 16, 26, ...
From Robert Israel, Apr 02 2018: (Start)
For n > 7, a(n) = d - n where d is the least divisor of Fibonacci(n)-n that is not less than n.
In particular a(n) = Fibonacci(n)-2*n if n > 7 is in A270821. (End)
FORMULA
a(A023172(n)) = 0.
a(n) = -1 for n is in {2, 3, 4, 6, 7}. Otherwise, 0 <= a(n) <= Fibonacci(n) - 2*n.
EXAMPLE
a(7) = -1 because there is no nonnegative k such that k + 7 divides k + 13.
a(8) = 5 because 5 + 8 = 13 divides 5 + Fibonacci(8) = 26 and 5 is the only nonnegative integer with this property.
a(11) = 2 because 2 + 11 = 13 divides 2 + Fibonacci(11) = 91 and 2 is the least nonnegative integer with this property.
MAPLE
f:= proc(n) local t, d;
t:= combinat:-fibonacci(n);
subs(infinity=-1, min(select(`>=`, numtheory:-divisors(t-n), n))-n)
end proc:
f(0):= 1: f(1):= 0: f(5):= 0:
map(f, [$0..100]); # Robert Israel, Apr 02 2018
MATHEMATICA
a[n_] := Module[{t = Fibonacci[n]}, Min[Select[Divisors[t-n], # >= n&]-n] /. Infinity -> -1];
a[0] = 1; a[1] = 0; a[5] = 0;
a /@ Range[0, 100] (* Jean-François Alcover, Oct 26 2020, after Robert Israel *)
CROSSREFS
KEYWORD
sign
AUTHOR
Altug Alkan, Mar 31 2018
STATUS
approved