login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121104 a(n) = Fibonacci(n - 1) modulo the n-th prime number. 2
1, 1, 2, 3, 5, 8, 13, 21, 5, 24, 15, 21, 18, 1, 27, 43, 11, 38, 63, 49, 44, 32, 88, 2, 83, 59, 73, 76, 79, 63, 113, 9, 94, 61, 6, 123, 76, 149, 127, 34, 74, 124, 32, 83, 1, 3, 91, 212, 204, 232, 85, 76, 171, 141, 148, 234, 145, 38, 2, 271, 208, 179, 194, 73, 14, 127, 177 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
LINKS
FORMULA
a(n) = Fibonacci(n - 1) modulo Prime(n).
EXAMPLE
a(10)=5 because the 9th Fibonacci=34, the 10th Prime=29, and 34 mod 29=5.
MATHEMATICA
With[{nn=70}, Mod[First[#], Last[#]]&/@Thread[{Fibonacci[Range[nn-1]], Prime[ Range[2, nn]]}]] (* Harvey P. Dale, Feb 27 2013 *)
Table[Mod[Fibonacci[n - 1], Prime[n]], {n, 2, 70}] (* Vincenzo Librandi, Jun 19 2017 *)
PROG
(PARI) a(n) = fibonacci(n-1) % prime(n); \\ Michel Marcus, Jun 18 2017
(PARI) fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]
a(n)=lift(fibmod(n-1, prime(n))) \\ Charles R Greathouse IV, Jun 19 2017
(Magma) [Fibonacci(n-1) mod NthPrime(n): n in [2..70]]; // Vincenzo Librandi, Jun 19 2017
CROSSREFS
Sequence in context: A327451 A137290 A268962 * A118627 A358404 A080787
KEYWORD
nonn
AUTHOR
Gil Broussard, Aug 12 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 04:38 EDT 2024. Contains 371696 sequences. (Running on oeis4.)