cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

5, 10, 18, 30, 30, 30, 30, 180, 180, 180, 180, 840, 840, 1260, 1260, 1260, 1260, 24480, 24480, 63000, 63000, 63000, 63000, 63000, 63000, 63000, 63000, 63000, 63000, 356400, 356400, 356400, 356400, 356400, 356400, 356400, 356400, 5783400, 5783400, 5783400, 5783400, 5783400, 5783400
Offset: 0

Views

Author

Alex Ratushnyak, Feb 03 2018

Keywords

Examples

			5 is the smallest integer i such that gcd(F(i), i) > 1, because F(5)=5. Therefore a(0)=5.
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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    isok(k, n) = {for (x=0, n, if (gcd(fibonacci(k), k+x) == 1, return(0));); return(1);}
    a(n) = {my(k=1); while (!isok(k,n), k++); k;} \\ Michel Marcus, Feb 05 2018
  • Python
    p0=0
    p1=1
    def GCD(x,y):
        tmp = y
        y = x % y
        if y==0: return tmp
        return GCD(tmp, y)
    n=0
    for i in range(1,1000000):
        p0,p1 = p1, p0+p1
        for x in range(1000000):
            if GCD(p0,i+x)==1: break
        for j in range(n, x):
            print(i)
        if x>n: n=x
    

Extensions

a(29)-a(36) from Michael De Vlieger, Feb 05 2018
a(37)-a(42) from Jon E. Schoenfield, Apr 24 2018