OFFSET
1,2
COMMENTS
Terms are 1 when prime(n) == 1 or 4 mod 5, terms are prime(n)-1 when prime(n) == 2 or 3 mod 5.
In general, it appears that Fibonacci(k*p) mod p = Fibonacci(k) or p-Fibonacci(k) for prime p > Fibonacci(k). For example Fibonacci(8*29) mod 29 = 21. - Gary Detlefs, May 28 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
R. Peele and P. Stanica, Matrix powers of column-justified Pascal triangles and Fibonacci sequences, arXiv:math/0010186 [math.CO], 2000.
EXAMPLE
prime(3) = 5, fibonacci(5) = 5 == 0 mod 5.
MAPLE
p:= (M, n, k)-> map(x-> x mod k, `if`(n=0, <<1|0>, <0|1>>,
`if`(n::even, p(M, n/2, k)^2, p(M, n-1, k).M))):
a:= n-> p(<<0|1>, <1|1>>, ithprime(n)$2)[1, 2]:
seq(a(n), n=1..80); # Alois P. Heinz, Oct 10 2015
MATHEMATICA
Mod[Fibonacci[Prime[#]], Prime[#]]&/@Range[75] (* Harvey P. Dale, Jan 14 2011 *)
PROG
(PARI) vector(80, n, fibonacci(prime(n)) % prime(n)) \\ Michel Marcus, Jul 15 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Jud McCranie, Dec 11 1999
STATUS
approved