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 A087049 #18 Jan 19 2024 04:55:35 %S A087049 1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0, %T A087049 0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0, %U A087049 1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,1 %N A087049 Characteristic sequence for numbers n>=0 that are either squares or have a square > 1 as factor. %C A087049 a(0)=1, a(1)=1, n>=2: a(n)=1 if isquarefree(n)=false else 0. %C A087049 Except for a(0)=1 and a(1)=1 this is the bit-flipped unsigned Moebius sequence abs(A008683(n)), n>=2. %C A087049 For n>=2: a(n)=1 iff n is from A013929 (not squarefree). %H A087049 Antti Karttunen, <a href="/A087049/b087049.txt">Table of n, a(n) for n = 0..65537</a> %H A087049 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>. %H A087049 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>. %F A087049 a(n) = 1 if n is a perfect square (A000290) or has some square > 1 as a factor, else 0. %F A087049 a(0) = a(1) = 1; for n > 1, a(n) = 1 - A008966(n). - _Antti Karttunen_, Nov 17 2017 %F A087049 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 1 - 6/Pi^2 (A229099). - _Amiram Eldar_, Jan 19 2024 %e A087049 a(4) = 1 because 4 is a square; a(8) = 1 because 8 = 2^2 * 2. %p A087049 1,1,seq(`if`(numtheory:-issqrfree(n),0,1),n=2..100); # _Robert Israel_, Nov 17 2017 %t A087049 Array[If[# <= 1, 1, 1 - Abs@ MoebiusMu@ #] &, 105, 0] (* _Michael De Vlieger_, Nov 17 2017 *) %o A087049 (PARI) A087049(n) = if(n<=1,1,1-abs(moebius(n))); \\ _Antti Karttunen_, Nov 17 2017 %Y A087049 Cf. A008683, A008966, A080733, A000290 (squares), A013929 (not squarefree), A229099. %K A087049 nonn,easy %O A087049 0,1 %A A087049 _Wolfdieter Lang_, Sep 08 2003