login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #23 Mar 13 2023 11:17:59

%S 0,0,0,0,0,0,9,0,32,10,33,0,37,273,80,840,1116,816,404,1485,1742,7854,

%T 27833,0,49100,37681,66606,85839,222482,656920,1335931,417165,362268,

%U 3309347,1266460,976752,20352231,19601527,4303068,8848455,136897669,254107048

%N a(n) = n! mod Fibonacci(n).

%H Vincenzo Librandi, <a href="/A182213/b182213.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A000142(n) mod A000045(n), n>0.

%F a(n) = n! mod fibonacci(n), n>0.

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

%t Table[Mod[n!, Fibonacci[n]], {n, 50}] (* _T. D. Noe_, Apr 19 2012 *)

%o (Python)

%o prpr = 0

%o prev = 1

%o fa = 1

%o for i in range(2,50):

%o print(fa % prev, end=',')

%o fa *= i

%o current = prev + prpr

%o prpr = prev

%o prev = current

%o (PARI) a(n) = n!%fibonacci(n); \\ _Bill McEachen_, Feb 03 2014

%o (Magma) [Factorial(n) mod Fibonacci(n): n in [1..50]]; // _Vincenzo Librandi_, Feb 04 2014

%Y Cf. A000045, A000142, A182212.

%K nonn,easy

%O 1,7

%A _Alex Ratushnyak_, Apr 19 2012