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 A121262 #118 Dec 14 2023 05:26:45 %S A121262 1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0, %T A121262 0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0, %U A121262 1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0 %N A121262 The characteristic function of the multiples of four. %C A121262 Period 4: repeat [1, 0, 0, 0]. %C A121262 a(n) is also the number of partitions of n where each part is four (Since the empty partition has no parts, a(0) = 1). Hence a(n) is also the number of 2-regular graphs on n vertices such that each component has girth exactly four. - _Jason Kimberley_, Oct 01 2011 %C A121262 This sequence is the Euler transformation of A185014. - _Jason Kimberley_, Oct 01 2011 %C A121262 Number of permutations satisfying -k <= p(i) - i <= r and p(i)-i not in I, i = 1..n, with k = 1, r = 3, I = {0, 1, 2}. - _Vladimir Baltic_, Mar 07 2012 %D A121262 G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 82. %H A121262 Antti Karttunen, <a href="/A121262/b121262.txt">Table of n, a(n) for n = 0..65537</a> %H A121262 Vladimir Baltic, <a href="http://pefmath.etf.rs/vol4num1/AADM-Vol4-No1-119-135.pdf">On the number of certain types of strongly restricted permutations</a>, Applicable Analysis and Discrete Mathematics 4 (2010), 119-135 %H A121262 Steve Chow, <a href="https://youtu.be/umH_AL6vQ9Y">0,0,0,1,0,0,0,1</a> (deriving an explicit formula for the sequence) :YouTube Video, 2017. %H A121262 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A121262 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1). %F A121262 a(n) = (1/4)*(2*cos(n*Pi/2) + 1 + (-1)^n). %F A121262 Additive with a(p^e) = 1 if p = 2 and e > 1, 0 otherwise. %F A121262 Sequence shifted right by 2 is additive with a(p^e) = 1 if p = 2 and e = 1, 0 otherwise. %F A121262 a(n) = 1 - (C(n + 1, n + (-1)^(n+1)) mod 2). %F A121262 a(n) = 0^(n mod 4). - _Reinhard Zumkeller_, Sep 30 2008 %F A121262 a(n) = !(n%4). - _Jaume Oliver Lafont_, Mar 01 2009 %F A121262 a(n) = (1/4)*(1 + I^n + (-1)^n + (-I)^n). - _Paolo P. Lava_, May 04 2010 %F A121262 a(n) = ((n-1)^k mod 4 - (n-1)^(k-1) mod 4)/2, k > 2. - _Gary Detlefs_, Feb 21 2011 %F A121262 a(n) = floor(1/2*cos(n*Pi/2) + 1/2). - _Gary Detlefs_, May 16 2011 %F A121262 G.f.: 1/(1 - x^4); a(n) = (1 + (-1)^n)*(1 + i^((n-1)*n))/4, where i = sqrt(-1). - _Bruno Berselli_, Sep 28 2011 %F A121262 a(n) = floor(((n+3) mod 4)/3). - _Gary Detlefs_, Dec 29 2011 %F A121262 a(n) = floor(n/4) - floor((n-1)/4). - _Tani Akinari_, Oct 25 2012 %F A121262 a(n) = ceiling( (1/2)*cos(Pi*n/2) ). - _Wesley Ivan Hurt_, May 31 2013 %F A121262 a(n) = ((1+(-1)^(n/2))*(1+(-1)^n))/4. - _Bogart B. Strauss_, Jul 14 2013 %F A121262 a(n) = C(n-1,3) mod 2. - _Wesley Ivan Hurt_, Oct 07 2014 %F A121262 a(n) = (((n+1) mod 4) mod 3) mod 2. - _Ctibor O. Zizka_, Dec 11 2014 %F A121262 a(n) = (sin(Pi*(n+1)/2)^2)/2 + sin(Pi*(n+1)/2)/2. - _Mikael Aaltonen_, Jan 02 2015 %F A121262 E.g.f.: (cos(x) + cosh(x))/2. - _Vaclav Kotesovec_, Feb 15 2015 %F A121262 a(n) = a(n-4) for n>3. - _Wesley Ivan Hurt_, Jul 07 2016 %F A121262 a(n) = (1-sqrt(2)*cos(n*Pi/2-3*Pi/4))/2 * cos(n*Pi/2). - (found by Steve Chow) _Iain Fox_, Nov 16 2017 %F A121262 a(n) = 1-A166486(n). - _Antti Karttunen_, Jul 29 2018 %F A121262 a(n) = (1-(-1)^A142150(n+1))/2. - _Adriano Caroli_, Sep 28 2019 %p A121262 seq(op([1, 0, 0, 0]), n=0..50); # _Wesley Ivan Hurt_, Jul 07 2016 %t A121262 Table[Boole[IntegerQ[n/4]], {n,0,127}] (* _Alonso del Arte_, Jul 14 2013 *) %o A121262 (Haskell) %o A121262 a121262 = (0 ^) . flip mod 4 -- _Reinhard Zumkeller_, Mar 04 2015 %o A121262 a121262_list = cycle [1,0,0,0] -- _Reinhard Zumkeller_, Jan 06 2012 %o A121262 (PARI) a(n)=!(n%4) \\ _Charles R Greathouse IV_, Oct 25 2012 %o A121262 (Magma) &cat [[1, 0, 0, 0]^^30]; // _Wesley Ivan Hurt_, Jul 07 2016 %Y A121262 A011765 is another version of the same sequence. %Y A121262 Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), A079978 (g=3), this sequence (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7). - _Jason Kimberley_, Oct 14 2011 %Y A121262 Cf. A010873, A166486, A185014. %K A121262 nonn,easy %O A121262 0,1 %A A121262 _Paolo P. Lava_ and _Giorgio Balzarotti_, Aug 23 2006, Aug 30 2007 %E A121262 More terms from _Antti Karttunen_, Jul 29 2018