cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A248740 a(n) = Fibonacci(n) mod 1000.

Original entry on oeis.org

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

Views

Author

Franz Vrabec, Oct 13 2014

Keywords

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'.

Examples

			a(17) = (a(16) + a(15)) mod 1000 = (987 + 610) mod 1000 = 1597 mod 1000 = 597.
		

Crossrefs

Programs

  • Magma
    [Fibonacci(n) mod 1000: n in [0..80]]; // Vincenzo Librandi, Oct 17 2014
    
  • 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
  • PARI
    vector(100,n,fibonacci(n-1)%1000) \\ Derek Orr, Oct 17 2014

Formula

a(n) = (a(n-1) + a(n-2)) mod 1000 for n>1, a(0) = 0, a(1) = 1.

Extensions

More terms from Vincenzo Librandi, Oct 17 2014