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.

A232991 Period 6: repeat [1, 0, 0, 0, 1, 0].

This page as a plain text file.
%I A232991 #54 Dec 12 2023 07:45:43
%S A232991 1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,
%T A232991 1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,
%U A232991 0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1
%N A232991 Period 6: repeat [1, 0, 0, 0, 1, 0].
%D A232991 Andrews, George E., q-series: their development and application in analysis, number theory, combinatorics, physics, and computer algebra. CBMS Regional Conference Series in Mathematics, 66. Published for the Conference Board of the Mathematical Sciences, Washington, DC; by the American Mathematical Society, Providence, RI, 1986. xii+130 pp. ISBN: 0-8218-0716-1 MR0858826 (88b:11063). See p. 105.
%H A232991 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).
%F A232991 a(n) = ceiling((n + 4)/6) - floor((n + 4)/6) - (n mod 2). - _Wesley Ivan Hurt_, Mar 13 2014
%F A232991 a(n) = cos(Pi*n/2)/3*(cos(Pi*n/6) + 2*cos(Pi*n/2) + sqrt(3)*sin(Pi*n/6)). - _Vaclav Kotesovec_, Mar 23 2014
%F A232991 G.f.: (1 + x^4)/(1 - x^6). - _Bruno Berselli_, Feb 18 2015
%F A232991 a(n) = if gcd(n+1, 6) > 1 then 0, otherwise 1. - _Reinhard Zumkeller_, Apr 06 2015
%F A232991 a(n) = a(n-6) for n > 5. - _Wesley Ivan Hurt_, Jun 20 2016
%F A232991 E.g.f.: (2*cosh(x) - sqrt(3)*sin(sqrt(3)*x/2)*sinh(x/2) + cos(sqrt(3)*x/2)*cosh(x/2))/3. - _Ilya Gutkovskiy_, Jun 21 2016
%F A232991 a(n) = gcd(gcd(floor((n+2)/3), 2), n) - 1. - _Lechoslaw Ratajczak_, Jul 30 2021
%F A232991 a(n) = sign((n+1) mod ((5+(-1)^n)/2)). - _Wesley Ivan Hurt_, Feb 04 2022
%p A232991 A232991:=n->ceil((n+4)/6) - floor((n+4)/6) - (n mod 2): seq(A232991(n), n=0..100); # _Wesley Ivan Hurt_, Mar 13 2014
%t A232991 Table[Ceiling[(n + 4)/6] - Floor[(n + 4)/6] - Mod[n, 2], {n, 0, 100}] (* _Wesley Ivan Hurt_, Mar 13 2014 *)
%t A232991 Table[Cos[Pi*n/2]/3 * (Cos[Pi*n/6] + 2*Cos[Pi*n/2] + Sqrt[3]*Sin[Pi*n/6]), {n, 0, 100}] (* _Vaclav Kotesovec_, Mar 23 2014 *)
%o A232991 (Magma) /* By definition: */ &cat [[1,0,0,0,1,0]: n in [0..20]]; // _Bruno Berselli_, Feb 18 2015
%o A232991 (Magma) [(((n+3) mod 6) mod 5) mod 2: n in [0..100]]; // _Vincenzo Librandi_, Feb 18 2015
%o A232991 (Haskell)
%o A232991 a232991 = (0 ^) . subtract 1 . gcd 6 . (+ 1)
%o A232991 a232991_list = cycle [1,0,0,0,1,0]
%o A232991 -- _Reinhard Zumkeller_, Apr 06 2015
%o A232991 (PARI) a(n)=(n+9)\6 - (n+4)\6 - n%2 \\ _Charles R Greathouse IV_, Jul 17 2016
%o A232991 (Python)
%o A232991 def A232991(n): return int(not (n+1) % 6 & 3 ^ 1) # _Chai Wah Wu_, May 25 2022
%Y A232991 Cf. A089128, A232990.
%K A232991 nonn,easy
%O A232991 0,1
%A A232991 _N. J. A. Sloane_, Dec 13 2013