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.

A182213 a(n) = n! mod Fibonacci(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 9, 0, 32, 10, 33, 0, 37, 273, 80, 840, 1116, 816, 404, 1485, 1742, 7854, 27833, 0, 49100, 37681, 66606, 85839, 222482, 656920, 1335931, 417165, 362268, 3309347, 1266460, 976752, 20352231, 19601527, 4303068, 8848455, 136897669, 254107048
Offset: 1

Views

Author

Alex Ratushnyak, Apr 19 2012

Keywords

Examples

			a(6) = 720 mod 8 = 0, a(7)= 5040 mod 13 = 9.
		

Crossrefs

Programs

  • Magma
    [Factorial(n) mod Fibonacci(n): n in [1..50]]; // Vincenzo Librandi, Feb 04 2014
  • Mathematica
    Table[Mod[n!, Fibonacci[n]], {n, 50}] (* T. D. Noe, Apr 19 2012 *)
  • PARI
    a(n) = n!%fibonacci(n); \\ Bill McEachen, Feb 03 2014
    
  • Python
    prpr = 0
    prev = 1
    fa = 1
    for i in range(2,50):
        print(fa % prev, end=',')
        fa *= i
        current = prev + prpr
        prpr = prev
        prev = current
    

Formula

a(n) = A000142(n) mod A000045(n), n>0.
a(n) = n! mod fibonacci(n), n>0.