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 A117444 #29 Dec 14 2023 05:32:26 %S A117444 0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2, %T A117444 -1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2, %U A117444 -2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0,1,2,-2,-1,0 %N A117444 Period 5: Repeat [0, 1, 2, -2, -1]. %C A117444 See the comments in A203571 concerning formulas of the n-th term of periodic sequences. - _M. F. Hasler_, Jan 13 2013 %H A117444 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,-1). %F A117444 G.f.: x*(1+3*x+x^2)/(1+x+x^2+x^3+x^4) = x*(1+2*x^2-2*x^3-x^4)/(1-x^5). %F A117444 a(n) = (1/2)*Sum_{k=0..5} L(k*(k^2-n)/5), where L(j/p) is the Legendre symbol of j and p. %F A117444 a(n) = sqrt(2+2/sqrt(5))*sin(2*Pi*n/5)-sqrt(2-2/sqrt(5))*sin(4*Pi*n/5). %F A117444 a(n) = -2 + floor(23401/99999*10^(n+1)) mod 10. - _Hieronymus Fischer_, Jan 03 2013 %F A117444 a(n) = -2 + floor(863/1562*5^(n+1)) mod 5. - _Hieronymus Fischer_, Jan 04 2013 %F A117444 a(n) = 2 - ((2-n) mod 5). - _Wesley Ivan Hurt_, Jul 12 2014 %F A117444 a(n) = - a(n-1) - a(n-2) - a(n-3) - a(n-4). - _Wesley Ivan Hurt_, Sep 05 2022 %p A117444 A117444:=n->2 - ((2-n) mod 5): seq(A117444(n), n=0..50); # _Wesley Ivan Hurt_, Jul 12 2014 %t A117444 Table[2 - Mod[2 - n, 5], {n, 0, 50}] (* _Wesley Ivan Hurt_, Jul 12 2014 *) %o A117444 (PARI) A117444(n)=4315*5^(n%5)\1562%5-2 \\ _M. F. Hasler_, Jan 13 2013 %o A117444 (PARI) A117444(n,p=[0,1,2,-2,-1])=p[n%#p+1] \\ _M. F. Hasler_, Jan 13 2013 %o A117444 (Magma) [2-((2-n) mod 5) : n in [0..50]]; // _Wesley Ivan Hurt_, Jul 12 2014 %Y A117444 Cf. A061347. %K A117444 easy,sign %O A117444 0,3 %A A117444 _Paul Barry_, Mar 16 2006 %E A117444 More terms from _Wesley Ivan Hurt_, Jul 12 2014