cp's OEIS Frontend

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.

A130658 Period 4: repeat [1, 1, 2, 2].

This page as a plain text file.
%I A130658 #36 Dec 12 2023 09:21:46
%S A130658 1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,
%T A130658 2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,
%U A130658 1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1
%N A130658 Period 4: repeat [1, 1, 2, 2].
%C A130658 Continued fraction expansion of (9+sqrt(221))/14. - _Klaus Brockhaus_, May 03 2010
%C A130658 From _Klaus Brockhaus_, May 14 2010: (Start)
%C A130658 Decimal expansion of 34/303.
%C A130658 a(n) = A014695(n+3). (End)
%C A130658 Lengths of runs in A214090. - _Reinhard Zumkeller_, Jul 06 2012
%H A130658 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).
%F A130658 G.f.: ( 1+2*x^2 ) / ( (1-x)*(1+x^2) ). - _R. J. Mathar_, Jan 18 2011
%F A130658 a(n) = (n^3 mod 4 + (n+1)^3 mod 4 + 1)/2. - _Gary Detlefs_, Apr 15 2011
%F A130658 a(n) = -1/2*cos(1/2*Pi*n)-1/2*sin(1/2*Pi*n)+3/2. - _Leonid Bedratyuk_, May 13 2012
%F A130658 From _Wesley Ivan Hurt_, May 30 2015: (Start)
%F A130658 a(n) = a(n-1) - a(n-2) + a(n-3), n>3.
%F A130658 a(n) = (3+(-1)^((2*n+3+(-1)^n)/4))/2. (End)
%F A130658 From _Wesley Ivan Hurt_, Jul 11 2016: (Start)
%F A130658 a(n) = a(n-4) for n>3.
%F A130658 a(n) = A021913(n) + 1. (End)
%p A130658 seq(op([1, 1, 2, 2]), n=0..50); # _Wesley Ivan Hurt_, Jul 11 2016
%t A130658 PadRight[{}, 100, {1, 1, 2, 2}] (* _Wesley Ivan Hurt_, Jul 11 2016 *)
%o A130658 (Haskell)
%o A130658 a130658 = (+ 1) . (`div` 2) . (`mod` 4)
%o A130658 a130658_list = cycle [1,1,2,2]  -- _Reinhard Zumkeller_, Jul 06 2012
%o A130658 (Magma) &cat [[1, 1, 2, 2]^^30]; // _Wesley Ivan Hurt_, Jul 11 2016
%o A130658 (PARI) a(n)=(n%4>1)+1 \\ _Charles R Greathouse IV_, Jul 11 2016
%Y A130658 Cf. A014695, A021913, A177156, A214090.
%K A130658 nonn,easy,less
%O A130658 0,3
%A A130658 _Paul Curtz_, Jun 21 2007
%E A130658 More terms from _Klaus Brockhaus_, May 14 2010