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.
%I A173635 #46 Sep 08 2022 08:45:50 %S A173635 1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4, %T A173635 2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4, %U A173635 4,2,1,1,4,4,2,1,1,4,4,2,1 %N A173635 Period 5 sequence: 1, 1, 4, 4, 2, ... %C A173635 a(n) is the length of the period of the sequence (n^i) mod m, i=1,2,...; m = 10 or m = 5. %H A173635 H. K. Funda, <a href="https://web.archive.org/web/20130308211724/http://www.freshersworld.com/content/how-find-out-last-digit-%E2%80%93-beginner">How to find out last digit</a> %H A173635 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1). %F A173635 a(n) = (1 + floor((n mod 5)/2))^2 mod 7. - _Victor Dumbrava_, Jan 12 2018 %F A173635 G.f.: (1 + x + 4*x^2 + 4*x^3 + 2*x^4)/(1 - x^5). - _Iain Fox_, Jan 12 2018 %e A173635 a(0) = 1 because (0^i) mod 10 = 0, i=1,2,...; %e A173635 a(2) = 4 since(2^1) mod 5 = 2, (2^2) mod 5 = 4, (2^3) mod 5 = 3, (2^4) mod 5 = 1, and (2^5) mod 5 = 2 again. So we have the sequence 2,4,3,1,... with period of length 4. %t A173635 Flatten[Table[{1, 1, 4, 4, 2}, {20}]] (* _T. D. Noe_, Nov 20 2012 *) %t A173635 CoefficientList[ Series[(-1 - x - 4x^2 - 4x^3 - 2x^4)/(x^5 -1), {x, 0, 104}], x] (* or *) %t A173635 LinearRecurrence[{0, 0, 0, 0, 1}, {1, 1, 4, 4, 2}, 105] (* _Robert G. Wilson v_, Jan 20 2018 *) %o A173635 (PARI) a(n) = [1, 1, 4, 4, 2][(n%5)+1] \\ _Iain Fox_, Jan 12 2018 %o A173635 (PARI) a(n) = ((1 + floor((n%5)/2))^2) % 7 \\ _Iain Fox_, Jan 12 2018 %o A173635 (PARI) first(n) = Vec((1 + x + 4*x^2 + 4*x^3 + 2*x^4)/(1 - x^5) + O(x^n)) \\ _Iain Fox_, Jan 12 2018 %o A173635 (Magma) &cat[ [1,1,4,4,2]: n in [0..23] ]; // _Vincenzo Librandi_, Jan 19 2018 %K A173635 nonn,easy %O A173635 0,3 %A A173635 _Washington Bomfim_, Nov 23 2010