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”).

Lucas numbers (beginning with 1) mod 10.
8

%I #77 Oct 19 2024 15:57:32

%S 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,

%T 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,

%U 6,3,9,2,1,3,4,7,1,8,9,7,6,3,9,2,1,3,4

%N Lucas numbers (beginning with 1) mod 10.

%C Period 12: repeat [1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9, 2].

%H G. C. Greubel, <a href="/A130893/b130893.txt">Table of n, a(n) for n = 0..10000</a>

%H Maarten Bullynck, <a href="http://images-archive.math.cnrs.fr/L-histoire-de-l-informatique-et-l-histoire-des-mathematiques-rencontres.html">L’histoire de l’informatique et l’histoire des mathématiques : rencontres, opportunités et écueils</a>, Images des Mathématiques, CNRS, 2015 (in French).

%H Johann Heinrich Lambert, <a href="http://www.deutschestextarchiv.de/book/show/lambert_architectonic01_1771">Anlage zur Architectonic, oder Theorie des Einfachen und des Ersten in der philosophischen und mathematischen Erkenntniß</a>, 1771.

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

%F a(n) = (a(n-2) + a(n-1)) mod 10, with a(0) = 1, a(1) = 3.

%F a(n) = A000204(n+1) mod 10 = A000032(n+1) mod 10. - _Joerg Arndt_, Sep 17 2013

%F 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

%F From _G. C. Greubel_, Feb 08 2016: (Start)

%F 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).

%F a(n+12) = a(n). (End)

%e 1 + 3 = 4 = 4 mod 10, then a(3) = 4.

%e 3 + 4 = 7 = 7 mod 10, then a(4) = 7.

%e 4 + 7 = 11 = 1 mod 10, then a(5) = 1.

%t Nest[Append[#, Mod[Total[Take[#, -2]], 10]] &, {1, 3}, 110] (* _Harvey P. Dale_, Apr 05 2011 *)

%t t = {1, 3}; Do[AppendTo[t, Mod[t[[-1]] + t[[-2]], 10]], {99}]; t (* _T. D. Noe_, Sep 16 2013 *)

%t Mod[LucasL[Range[100]], 10] (* _Alonso del Arte_, Sep 30 2015 *)

%t LinearRecurrence[{1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1}, {1, 3, 4, 7,

%t 1, 8, 9, 7, 6, 3, 9}, 100] (* _G. C. Greubel_, Feb 08 2016 *)

%o (Ruby)

%o def truncM10(n)

%o ..a = 1

%o ..b = 3

%o ..n.times do

%o ....a, b = (b % 10), ((a + b) % 10)

%o ..end

%o ..return b

%o end

%o # _Joseph P. Shoulak_, Sep 15 2013

%o (PARI) a(n) = (fibonacci(n+1)+fibonacci(n-1)) % 10;

%o vector(100, n, a(n)) \\ _Altug Alkan_, Sep 30 2015

%o (Magma) [Lucas(n) mod 10: n in [1..100]]; // _Vincenzo Librandi_, Oct 01 2015

%Y Cf. A000032, A003983, A111958.

%K easy,nonn,base

%O 0,2

%A Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 22 2007

%E Corrected and extended by _Harvey P. Dale_, Apr 05 2011

%E New name from _Joerg Arndt_, Sep 17 2013