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.

Showing 1-4 of 4 results.

A003893 a(n) = Fibonacci(n) mod 10.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5, 2, 7, 9, 6, 5, 1, 6, 7, 3, 0, 3, 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, 0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5, 2, 7, 9, 6, 5, 1, 6, 7, 3
Offset: 0

Views

Author

N. J. A. Sloane, elipper(AT)uoft02.utoledo.edu

Keywords

Comments

All blocks of 60 successive terms contain 20 even and 40 odd numbers. - Reinhard Zumkeller, Apr 09 2005
These are the analogs of the Fibonacci numbers in carryless arithmetic mod 10.

References

  • G. Marsaglia, The mathematics of random number generators, pp. 73-90 of S. A. Burr, ed., The Unreasonable Effectiveness of Number Theory, Proc. Sympos. Appl. Math., 46 (1992). Amer. Math. Soc.

Crossrefs

Programs

  • Haskell
    a003893 n = a003893_list !! n
    a003893_list = 0 : 1 : zipWith (\u v -> (u + v) `mod` 10)
                           (tail a003893_list) a003893_list
    -- Reinhard Zumkeller, Jul 01 2013
    
  • Magma
    [Fibonacci(n) mod 10: n in [0..100]]; // Vincenzo Librandi, Feb 04 2014
    
  • Maple
    with(combinat,fibonacci); A003893 := proc(n) fibonacci(n) mod 10; end;
  • Mathematica
    Table[Mod[Fibonacci[n], 10], {n, 0, 99}] (* Alonso del Arte, Jul 29 2013 *)
    Table[IntegerDigits[Fibonacci[n]][[-1]], {n, 0, 99}] (* Alonso del Arte, Jul 29 2013 *)
    NumberDigit[Fibonacci[Range[0,120]],0] (* Requires Mathematica version 12 or later *) (* Harvey P. Dale, Jul 05 2021 *)
  • PARI
    a(n)=fibonacci(n)%10 \\ Charles R Greathouse IV, Feb 03 2014
    
  • Python
    A003893_list, a, b, = [], 0, 1
    for _ in range(10**3):
        A003893_list.append(a)
        a, b = b, (a+b) % 10 # Chai Wah Wu, Nov 26 2015

Formula

Periodic with period 60 = A001175(10).
From Reinhard Zumkeller, Apr 09 2005: (Start)
a(n) = (a(n-1) + a(n-2)) mod 10 for n > 1, a(0) = 0, a(1) = 1.
a(n) = A105471(n) - A105472(n)*10 = A105471(n)/10. (End)
a(n) = A010879(A000045(n)). - Michel Marcus, Nov 19 2022

Extensions

More terms from Ray Chandler, Nov 15 2003

A105472 Next-to-last digit of n-th Fibonacci number in decimal representation, a(n) = 0 for n <= 6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 6, 4, 1, 5, 6, 2, 9, 1, 1, 2, 4, 6, 0, 7, 8, 6, 5, 1, 6, 8, 5, 4, 9, 3, 3, 7, 0, 7, 7, 4, 2, 7, 9, 7, 7, 4, 1, 6, 7, 4, 2, 6, 8, 4, 2, 6, 8, 5, 4, 9, 3, 2, 6, 9, 5, 5, 0, 5, 6, 2, 8, 0, 9, 9, 8, 8, 7, 5, 3, 8, 2, 0, 2, 3, 6, 0, 7, 7, 4, 2, 7, 0, 7, 7, 5
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 09 2005

Keywords

Comments

a(n) = floor(A105471(n)/10) = floor(A000045(n)/10) mod 10;
A105471(n) = a(n)*10 + A003893(n);
the sequence is periodic with period 300; all blocks of 300 successive terms contain 160 even and 140 odd numbers.

Crossrefs

Programs

  • Mathematica
    Array[Mod[Floor[Fibonacci[#]/10], 10] &, 105, 0] (* Michael De Vlieger, Jan 04 2018 *)
    Join[{0,0,0,0,0,0,0},Table[IntegerDigits[Fibonacci[n]][[-2]],{n,7,120}]] (* Harvey P. Dale, Aug 22 2020 *)
  • PARI
    a(n) = (fibonacci(n) % 100)\10; \\ Michel Marcus, Jan 05 2018

A137290 Fibonacci(n) mod 30.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 4, 25, 29, 24, 23, 17, 10, 27, 7, 4, 11, 15, 26, 11, 7, 18, 25, 13, 8, 21, 29, 20, 19, 9, 28, 7, 5, 12, 17, 29, 16, 15, 1, 16, 17, 3, 20, 23, 13, 6, 19, 25, 14, 9, 23, 2, 25, 27, 22, 19, 11, 0, 11, 11, 22, 3, 25, 28, 23, 21, 14, 5, 19, 24, 13, 7, 20, 27, 17, 14
Offset: 1

Views

Author

Aaron M. Churchill (churchil(AT)math.udel.edu), Mar 15 2008

Keywords

Comments

Has period 120.

Crossrefs

Programs

  • Mathematica
    Mod[Fibonacci[Range[80]],30] (* Harvey P. Dale, Sep 12 2022 *)
  • PARI
    a(n) = fibonacci(n) % 30 \\ Michel Marcus, Jun 12 2013

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
Showing 1-4 of 4 results.