A302062 a(n) is the smallest nonnegative k such that n + k divides Fibonacci(n) + k, or -1 if no such k exists.
1, 0, -1, -1, -1, 0, -1, -1, 5, 16, 5, 2, 0, 7, 19, 2, 955, 3, 1265, 2062, 51, 2, 27, 80, 0, 0, 121341, 15080, 317755, 1, 8, 27, 867, 122, 5, 2, 0, 312, 13029339, 6680, 25, 2, 40, 39, 35, 2, 4537, 15, 0, 1, 95, 2, 67, 7, 8, 15, 32264490467, 58, 489, 3108, 0, 22, 1, 116, 973, 2, 125, 19, 143
Offset: 0
Keywords
Examples
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.
Programs
-
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 *)
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.
Comments