OFFSET
1,3
COMMENTS
For k=0..8, a(10^k) = 1, 26, 55, 5965, 99584, 728618, 2256590, 61329731, 1081853265. - Zak Seidov, Dec 23 2014
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = F(n) mod prime(n), where F(n) is the n-th Fibonacci number and prime(n) is the n-th prime number.
EXAMPLE
a(8) = F(8) mod prime(8) = 21 mod 19 = 2.
MAPLE
seq(combinat[fibonacci](n) mod ithprime(n), n=1..1000); # Robert Israel, Dec 24 2014
MATHEMATICA
Table[Mod[Fibonacci[n], Prime[n]], {n, 70}] (* Harvey P. Dale, Jan 25 2011 *)
PROG
(Magma) [Fibonacci(n) mod NthPrime(n): n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
(PARI) fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]
a(n)=lift(fibmod(n, prime(n))) \\ Charles R Greathouse IV, Jun 19 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Randy L. Ekl, Jun 20 2002
STATUS
approved