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 A010883 #43 Dec 30 2024 03:57:44 %S A010883 1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2, %T A010883 3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4, %U A010883 1,2,3,4,1,2,3,4,1,2,3,4,1 %N A010883 Simple periodic sequence: repeat 1,2,3,4. %C A010883 Partial sums are given by A130482(n) + n + 1. - _Hieronymus Fischer_, Jun 08 2007 %C A010883 1234/9999 = 0.123412341234... - _Eric Desbiaux_, Nov 03 2008 %H A010883 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1). %F A010883 a(n) = 1 + (n mod 4). - _Paolo P. Lava_, Nov 21 2006 %F A010883 From _Hieronymus Fischer_, Jun 08 2007: (Start) %F A010883 a(n) = A010873(n) + 1. %F A010883 Also a(n) = (1/2)*(5 - (-1)^n - 2*(-1)^((2*n - 1 + (-1)^n)/4)). %F A010883 G.f.: g(x) = (4*x^3 + 3*x^2 + 2*x + 1)/(1 - x^4) = (4*x^5 - 5*x^4 + 1)/((1 - x^4)*(1-x)^2). (End) %F A010883 a(n) = 5/2 - cos(Pi*n/2) - sin(Pi*n/2) - (-1)^n/2. - _R. J. Mathar_, Oct 08 2011 %t A010883 PadRight[{},120,{1,2,3,4}] (* _Harvey P. Dale_, Aug 02 2016 *) %o A010883 (PARI) a(n)=(n-1)%4+1 \\ _Charles R Greathouse IV_, Jun 11 2015 %o A010883 (Python) %o A010883 def A010883(n): return 1 + (n & 3) # _Chai Wah Wu_, May 25 2022 %Y A010883 Cf. A010872, A010873, A010874, A010875, A010876, A004526, A002264, A002265, A002266. %Y A010883 Cf. A177037 (decimal expansion of (9+2*sqrt(39))/15). - _Klaus Brockhaus_, May 01 2010 %K A010883 nonn,easy %O A010883 0,2 %A A010883 _N. J. A. Sloane_