login
A182213
a(n) = n! mod Fibonacci(n).
4
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,7
LINKS
FORMULA
a(n) = A000142(n) mod A000045(n), n>0.
a(n) = n! mod fibonacci(n), n>0.
EXAMPLE
a(6) = 720 mod 8 = 0, a(7)= 5040 mod 13 = 9.
MATHEMATICA
Table[Mod[n!, Fibonacci[n]], {n, 50}] (* T. D. Noe, Apr 19 2012 *)
PROG
(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
(PARI) a(n) = n!%fibonacci(n); \\ Bill McEachen, Feb 03 2014
(Magma) [Factorial(n) mod Fibonacci(n): n in [1..50]]; // Vincenzo Librandi, Feb 04 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Apr 19 2012
STATUS
approved