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 A008954 #43 Sep 08 2022 08:44:36 %S A008954 0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1, %T A008954 5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8, %U A008954 6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0 %N A008954 Final digit of triangular number n*(n+1)/2. %H A008954 G. C. Greubel, <a href="/A008954/b008954.txt">Table of n, a(n) for n = 0..1000</a> %H A008954 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a> %H A008954 <a href="/index/Rec#order_15">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1). %F A008954 a(1) = 1, a(n+1) = (a(n) + n + 1) mod 10. %F A008954 Periodic with period 20: repeat [0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3, 1,0]. - _Franklin T. Adams-Watters_, Mar 13 2006 %F A008954 It follows that all triangular numbers end with a digit of 0, 1, 3, 5, 6, or 8, and thus none end with a digit of 2, 4, 7, or 9. - _Harvey P. Dale_, Dec 31 2014 %F A008954 a(n) = n*(n+1)/2 mod 10. - _Ant King_, Apr 26 2009 %F A008954 From _R. J. Mathar_, Apr 15 2010: (Start) %F A008954 a(n) = a(n-5) - a(n-10) + a(n-15). %F A008954 G.f.: x*(1 +3*x +6*x^2 +5*x^4 +5*x^6 +5*x^8 +6*x^10 +3*x^11 +x^12)/(1 -x^5 +x^10 -x^15). (End) %F A008954 a(n) = A010879(A000217(n)). - _Michel Marcus_, May 26 2022 %p A008954 seq(mod(binomial(n+1, 2),10), n = 0 .. 100); # _G. C. Greubel_, Sep 14 2019 %t A008954 Table[Mod[n*(n+1)/2, 10], {n, 0, 100}] %t A008954 LinearRecurrence[{0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1},{0,1,3,6,0,5,1,8,6,5,5, 6,8,1,5},110] (* _Harvey P. Dale_, Dec 31 2014 *) %o A008954 (PARI) a(n)=n*(n+1)/2%10 \\ _Charles R Greathouse IV_, Mar 05 2014 %o A008954 (Magma) [Binomial(n+1,2) mod 10: n in [0..100]]; // _G. C. Greubel_, Sep 14 2019 %o A008954 (Sage) [Mod(binomial(n+1,2), 10) for n in (0..100)] # _G. C. Greubel_, Sep 14 2019 %o A008954 (GAP) List([0..100], n-> (Binomial(n+1,2) mod 10) ); # _G. C. Greubel_, Sep 14 2019 %Y A008954 Cf. A000217, A010879, A061501, A008953. %Y A008954 First differences of A111072. %K A008954 nonn,base,easy %O A008954 0,3 %A A008954 _N. J. A. Sloane_