login
A248740
a(n) = Fibonacci(n) mod 1000.
1
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 597, 584, 181, 765, 946, 711, 657, 368, 25, 393, 418, 811, 229, 40, 269, 309, 578, 887, 465, 352, 817, 169, 986, 155, 141, 296, 437, 733, 170, 903, 73, 976, 49, 25, 74, 99, 173, 272
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'.
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