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.

A002708 a(n) = Fibonacci(n) mod n.

Original entry on oeis.org

0, 1, 2, 3, 0, 2, 6, 5, 7, 5, 1, 0, 12, 13, 10, 11, 16, 10, 1, 5, 5, 1, 22, 0, 0, 25, 20, 11, 1, 20, 1, 5, 13, 33, 30, 0, 36, 1, 37, 35, 1, 34, 42, 25, 20, 45, 46, 0, 36, 25, 32, 23, 52, 8, 5, 21, 40, 1, 1, 0, 1, 1, 43, 59, 60, 52, 66, 65, 44, 15, 1, 0, 72, 73, 50, 3, 2, 44, 1, 5, 7, 1, 82, 24
Offset: 1

Views

Author

John C. Hallyburton, Jr. (hallyb(AT)evms.ENET.dec.com)

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002, p. 891.

Crossrefs

Cf. A002726, A002752, A023172 (indices of 0's), A023173 (indices of 1's), A023174-A023182.
Cf. A263101.
Main diagonal of A161553.

Programs

  • Magma
    [Fibonacci(n) mod n : n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
    
  • Maple
    with(combinat): [ seq( fibonacci(n) mod n, n=1..80) ];
    # second Maple program:
    a:= proc(n) local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:= r.M mod n fi;
             if p=0 then break fi; M:= M.M mod n
          od; r[1, 2]
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    Table[Mod[Fibonacci[n], n], {n, 1, 100}] (* Stefan Steinerberger, Apr 18 2006 *)
  • PARI
    a(n) = fibonacci(n) % n; \\ Michel Marcus, May 11 2016
  • Python
    A002708_list, a, b, = [], 1, 1
    for n in range(1,10**4+1):
        A002708_list.append(a%n)
        a, b = b, a+b # Chai Wah Wu, Nov 26 2015
    

Extensions

More terms from Stefan Steinerberger, Apr 18 2006