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.

A217737 a(n) = Fibonacci(n) mod n*(n+1).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 51, 167, 130, 171, 67, 190, 1, 45, 320, 1, 505, 168, 275, 649, 614, 319, 59, 620, 125, 837, 376, 407, 485, 1296, 1331, 419, 466, 1435, 1231, 1420, 1289, 1653, 830, 2069, 2161, 1344, 1849, 1975, 746, 1167, 1589, 872, 2645, 2205
Offset: 1

Views

Author

Alex Ratushnyak, Mar 22 2013

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) local r, M, p, m; r, M, p, m:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n, n*(n+1);
          do if irem(p, 2, 'p')=1 then r:= r.M mod m fi;
             if p=0 then break fi; M:= M.M mod m
          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)],{n,60}] (* Harvey P. Dale, Oct 02 2017 *)
  • PARI
    a(n)=fibonacci(n)%(n*(n+1)) \\ Charles R Greathouse IV, Jun 23 2017
  • Python
    prpr, prev = 0, 1
    for i in range(1, 333):
        cur = prpr + prev
        print(str(prev % (i*(i+1))), end=', ')
        prpr, prev = prev, cur
    

Formula

A000045(n) modulo A002378(n).