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 A168181 #37 Jul 10 2022 03:58:07 %S A168181 0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1, %T A168181 1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1, %U A168181 1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0 %N A168181 Characteristic function of numbers that are not multiples of 8. %C A168181 Multiplicative with a(p^e) = (if p=2 then A019590(e) else 1), p prime and e>0. %C A168181 Period 8 Repeat: [0, 1, 1, 1, 1, 1, 1, 1]. - _Wesley Ivan Hurt_, Jun 21 2014 %H A168181 Antti Karttunen, <a href="/A168181/b168181.txt">Table of n, a(n) for n = 0..16384</a> %H A168181 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A168181 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1). %F A168181 a(n+8) = a(n); %F A168181 a(n) = A000007(A010877(n)); %F A168181 a(A047592(n)) = 1; a(A008590(n)) = 0; %F A168181 A033440(n) = Sum_{k=0..n} a(k)*(n-k). %F A168181 Dirichlet g.f. (1-1/8^s)*zeta(s). - _R. J. Mathar_, Feb 19 2011 %F A168181 For the general case: the characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, m,n > 0. - _Boris Putievskiy_, May 08 2013 %F A168181 a(n) = sign(n mod 8). - _Wesley Ivan Hurt_, Jun 21 2014 %F A168181 a(n) = sign( 1 - floor(cos(Pi*n/4)) ). - _Wesley Ivan Hurt_, Jun 21 2014 %F A168181 Euler transform of length 8 sequence [ 1, 0, 0, 0, 0, 0, -1, 1]. - _Michael Somos_, Jun 24 2014 %F A168181 Moebius transform is length 8 sequence [ 1, 0, 0, 0, 0, 0, 0, -1]. - _Michael Somos_, Jun 24 2014 %F A168181 G.f.: x * (1 - x^7) / ((1 - x) * (1 - x^8)). - _Michael Somos_, Jun 24 2014 %F A168181 a(n) = 1-A253513(n). - _Antti Karttunen_, Oct 08 2017 %e A168181 G.f. = x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^9 + x^10 + x^11 + ... %p A168181 with(numtheory); A168181:=n->signum(n mod 8); seq(A168181(n), n=0..100); # _Wesley Ivan Hurt_, Jun 21 2014 %t A168181 Table[Sign[Mod[n,8]], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jun 21 2014 *) %o A168181 (Magma) [Sign(n mod 8) : n in [0..100]]; // _Wesley Ivan Hurt_, Jun 21 2014 %o A168181 (PARI) a(n)=n%8 > 0 \\ _Felix Fröhlich_, Aug 11 2014 %o A168181 (Python) %o A168181 def A168181(n): return int(bool(n&7)) # _Chai Wah Wu_, Jul 09 2022 %Y A168181 Cf. A168185, A145568, A168184, A168182, A109720, A097325, A011558, A166486, A011655, A000035, A010877, A244413, A253513. %K A168181 mult,nonn,easy %O A168181 0,1 %A A168181 _Reinhard Zumkeller_, Nov 30 2009