OFFSET
1,3
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002, p. 891.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 5000 terms from T. D. Noe)
E. Lucas, Théorie des nombres (annotated scans of a few selected pages)
MAPLE
with(combinat): [ seq( fibonacci(n) mod n, n=1..80) ];
# second Maple program:
a:= proc(n) local r, M, p; r, M, p:=
<<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
do if irem(p, 2, 'p')=1 then r:= r.M mod n fi;
if p=0 then break fi; M:= M.M mod n
od; r[1, 2]
end:
seq(a(n), n=1..100); # Alois P. Heinz, Nov 26 2016
MATHEMATICA
Table[Mod[Fibonacci[n], n], {n, 1, 100}] (* Stefan Steinerberger, Apr 18 2006 *)
PROG
(Magma) [Fibonacci(n) mod n : n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
(Python)
A002708_list, a, b, = [], 1, 1
for n in range(1, 10**4+1):
A002708_list.append(a%n)
a, b = b, a+b # Chai Wah Wu, Nov 26 2015
(PARI) a(n) = fibonacci(n) % n; \\ Michel Marcus, May 11 2016
CROSSREFS
KEYWORD
AUTHOR
John C. Hallyburton, Jr. (hallyb(AT)evms.ENET.dec.com)
EXTENSIONS
More terms from Stefan Steinerberger, Apr 18 2006
STATUS
approved