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.

A152727 Smallest positive non-divisor of the n-th Fibonacci number (A000045).

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 7, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3
Offset: 1

Views

Author

John W. Layman, Dec 11 2008

Keywords

Comments

Other values are a(840)=17 and a(12600)=37. Not all terms are prime; for example, the smallest non-divisor of F(2520) is 25.
It appears that the indices k for which a(n) is not prime are divisible by 2520 and that the sequence k/2520 is A047201. - Michel Marcus, Jul 10 2014

Crossrefs

Cf. A000045, A001651 (a(n)=2).

Programs

  • Maple
    f:= proc(n) local m,k;
    m:= combinat:-fibonacci(n);
    for k from 2 do if m mod k <> 0 then return k fi od:
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 06 2020
  • Mathematica
    a[n_] := Module[{f = Fibonacci[n], d}, For[d = 2, True, d++, If[!Divisible[f, d], Return[d]]]];
    Array[a, 100] (* Jean-François Alcover, Jul 24 2020 *)
  • PARI
    a(n) = my(f = fibonacci(n)); my(d = 2); while((f%d) == 0, d++); d; \\ Michel Marcus, Jul 10 2014
    
  • Sage
    def A152727(n) :
        d = 2
        f = fibonacci(n)
        while ((f % d) == 0) :
            d = d + 1
        return(d)
    [A152727(n) for n in (1..105)] # Jani Melik, Jul 10 2014