OFFSET
0,4
COMMENTS
The sequence is periodic with period 1500 = A001175(1000).
A number m of {0, 1, ..., 999} is not in the range of this sequence, iff m is congruent to 4 or 6 mod 8.
These numbers are the 250 = 1000 - A066853(1000) numbers of the set {4, 6, 12, 14, ..., 996, 998}. E.g., a Fibonacci number will never end in the digits '100'.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3000
FORMULA
a(n) = (a(n-1) + a(n-2)) mod 1000 for n>1, a(0) = 0, a(1) = 1.
EXAMPLE
a(17) = (a(16) + a(15)) mod 1000 = (987 + 610) mod 1000 = 1597 mod 1000 = 597.
MAPLE
a:= proc(n) option remember;
`if`(n<2, n, irem(a(n-1)+a(n-2), 1000))
end:
seq(a(n), n=0..60); # Alois P. Heinz, Oct 18 2015
PROG
(Magma) [Fibonacci(n) mod 1000: n in [0..80]]; // Vincenzo Librandi, Oct 17 2014
(PARI) vector(100, n, fibonacci(n-1)%1000) \\ Derek Orr, Oct 17 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Franz Vrabec, Oct 13 2014
EXTENSIONS
More terms from Vincenzo Librandi, Oct 17 2014
STATUS
approved