login
a(n) is the least i such that gcd(Fibonacci(i), i+x) > 1 for all x=0..n.
0

%I #27 Apr 25 2018 11:50:37

%S 5,10,18,30,30,30,30,180,180,180,180,840,840,1260,1260,1260,1260,

%T 24480,24480,63000,63000,63000,63000,63000,63000,63000,63000,63000,

%U 63000,356400,356400,356400,356400,356400,356400,356400,356400,5783400,5783400,5783400,5783400,5783400,5783400

%N a(n) is the least i such that gcd(Fibonacci(i), i+x) > 1 for all x=0..n.

%e 5 is the smallest integer i such that gcd(F(i), i) > 1, because F(5)=5. Therefore a(0)=5.

%e 10 is the smallest integer i such that gcd(F(i), i) > 1 and gcd(F(i), i+1) > 1, because F(10)=55, not coprime to 10 nor 11. Therefore a(1)=10.

%t Nest[Function[a, Append[a, SelectFirst[Range[10^5], Function[i, AllTrue[i + Range[0, Length@ a], ! CoprimeQ[Fibonacci@ i, #] &]]]]], {}, 29] (* _Michael De Vlieger_, Feb 05 2018 *)

%o (Python)

%o p0=0

%o p1=1

%o def GCD(x,y):

%o tmp = y

%o y = x % y

%o if y==0: return tmp

%o return GCD(tmp, y)

%o n=0

%o for i in range(1,1000000):

%o p0,p1 = p1, p0+p1

%o for x in range(1000000):

%o if GCD(p0,i+x)==1: break

%o for j in range(n, x):

%o print i

%o if x>n: n=x

%o (PARI) isok(k, n) = {for (x=0, n, if (gcd(fibonacci(k), k+x) == 1, return(0));); return(1);}

%o a(n) = {my(k=1); while (!isok(k,n), k++); k;} \\ _Michel Marcus_, Feb 05 2018

%Y Cf. A000045, A104714.

%K nonn

%O 0,1

%A _Alex Ratushnyak_, Feb 03 2018

%E a(29)-a(36) from _Michael De Vlieger_, Feb 05 2018

%E a(37)-a(42) from _Jon E. Schoenfield_, Apr 24 2018