login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A130893
Lucas numbers (beginning with 1) mod 10.
8
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,2
COMMENTS
Period 12: repeat [1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2].
FORMULA
a(n) = (a(n-2) + a(n-1)) mod 10, with a(0) = 1, a(1) = 3.
a(n) = A000204(n+1) mod 10 = A000032(n+1) mod 10. - Joerg Arndt, Sep 17 2013
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)
EXAMPLE
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.
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 *)
PROG
(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
(PARI) a(n) = (fibonacci(n+1)+fibonacci(n-1)) % 10;
vector(100, n, a(n)) \\ Altug Alkan, Sep 30 2015
(Magma) [Lucas(n) mod 10: n in [1..100]]; // Vincenzo Librandi, Oct 01 2015
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 22 2007
EXTENSIONS
Corrected and extended by Harvey P. Dale, Apr 05 2011
New name from Joerg Arndt, Sep 17 2013
STATUS
approved