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 A053796 #23 Jul 02 2025 16:01:59 %S A053796 0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2, %T A053796 0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1, %U A053796 2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0,0,2,1,2,0 %N A053796 a(n) = (n^2+n) modulo 5. %H A053796 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1). %F A053796 From _Bruno Berselli_, Dec 02 2010: (Start) %F A053796 G.f.: x*(2+x+2*x^2)/(1-x^5); %F A053796 a(n) = a(n-5) for n > 4. (End) %t A053796 Table[Mod[n^2+n,5],{n,0,110}] (* or *) PadRight[{},120,{0,2,1,2,0}] (* _Harvey P. Dale_, Sep 12 2017 *) %o A053796 (Magma) [(n^2+n) mod 5 : n in [0..100]]; // _Wesley Ivan Hurt_, Apr 20 2021 %Y A053796 Cf. A053793. %K A053796 nonn,easy %O A053796 0,2 %A A053796 Stuart M. Ellerstein (ellerstein(AT)aol.com), Mar 27 2000 %E A053796 More terms from _James Sellers_, Apr 08 2000