A130893 Lucas numbers (beginning with 1) mod 10.
1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2, 1, 3, 4
Offset: 0
Examples
1 + 3 = 4 = 4 mod 10, then a(3) = 4. 3 + 4 = 7 = 7 mod 10, then a(4) = 7. 4 + 7 = 11 = 1 mod 10, then a(5) = 1.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..10000
- Maarten Bullynck, L’histoire de l’informatique et l’histoire des mathématiques : rencontres, opportunités et écueils, Images des Mathématiques, CNRS, 2015 (in French).
- Johann Heinrich Lambert, Anlage zur Architectonic, oder Theorie des Einfachen und des Ersten in der philosophischen und mathematischen Erkenntniß, 1771.
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Programs
-
Magma
[Lucas(n) mod 10: n in [1..100]]; // Vincenzo Librandi, Oct 01 2015
-
Mathematica
Nest[Append[#, Mod[Total[Take[#, -2]], 10]] &, {1, 3}, 110] (* Harvey P. Dale, Apr 05 2011 *) t = {1, 3}; Do[AppendTo[t, Mod[t[[-1]] + t[[-2]], 10]], {99}]; t (* T. D. Noe, Sep 16 2013 *) Mod[LucasL[Range[100]], 10] (* Alonso del Arte, Sep 30 2015 *) LinearRecurrence[{1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1}, {1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9}, 100] (* G. C. Greubel, Feb 08 2016 *)
-
PARI
a(n) = (fibonacci(n+1)+fibonacci(n-1)) % 10; vector(100, n, a(n)) \\ Altug Alkan, Sep 30 2015
-
Ruby
def truncM10(n) a = 1 b = 3 n.times do a, b = (b % 10), ((a + b) % 10) end return b end # Joseph P. Shoulak, Sep 15 2013
Formula
a(n) = (a(n-2) + a(n-1)) mod 10, with a(0) = 1, a(1) = 3.
a(n) = f(5(n-1)+2) mod 10, where f(n) is the n-th Fibonacci number (A000045). - Joseph P. Shoulak, Sep 15 2013
From G. C. Greubel, Feb 08 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-6) + a(n-7) - a(n-8) + a(n-9) - a(n-10) + a(n-11).
a(n+12) = a(n). (End)
Extensions
Corrected and extended by Harvey P. Dale, Apr 05 2011
New name from Joerg Arndt, Sep 17 2013
Comments