login
A051831
a(n) = Fibonacci(prime(n)) mod prime(n), where prime(n) is the n-th prime.
4
1, 2, 0, 6, 1, 12, 16, 1, 22, 1, 1, 36, 1, 42, 46, 52, 1, 1, 66, 1, 72, 1, 82, 1, 96, 1, 102, 106, 1, 112, 126, 1, 136, 1, 1, 1, 156, 162, 166, 172, 1, 1, 1, 192, 196, 1, 1, 222, 226, 1, 232, 1, 1, 1, 256, 262, 1, 1, 276, 1, 282, 292, 306, 1, 312, 316, 1, 336, 346, 1, 352, 1
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
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