login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087049 Characteristic sequence for numbers n>=0 that are either squares or have a square > 1 as factor. 4
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(0)=1, a(1)=1, n>=2: a(n)=1 if isquarefree(n)=false else 0.
Except for a(0)=1 and a(1)=1 this is the bit-flipped unsigned Moebius sequence abs(A008683(n)), n>=2.
For n>=2: a(n)=1 iff n is from A013929 (not squarefree).
LINKS
FORMULA
a(n) = 1 if n is a perfect square (A000290) or has some square > 1 as a factor, else 0.
a(0) = a(1) = 1; for n > 1, a(n) = 1 - A008966(n). - Antti Karttunen, Nov 17 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 1 - 6/Pi^2 (A229099). - Amiram Eldar, Jan 19 2024
EXAMPLE
a(4) = 1 because 4 is a square; a(8) = 1 because 8 = 2^2 * 2.
MAPLE
1, 1, seq(`if`(numtheory:-issqrfree(n), 0, 1), n=2..100); # Robert Israel, Nov 17 2017
MATHEMATICA
Array[If[# <= 1, 1, 1 - Abs@ MoebiusMu@ #] &, 105, 0] (* Michael De Vlieger, Nov 17 2017 *)
PROG
(PARI) A087049(n) = if(n<=1, 1, 1-abs(moebius(n))); \\ Antti Karttunen, Nov 17 2017
CROSSREFS
Cf. A008683, A008966, A080733, A000290 (squares), A013929 (not squarefree), A229099.
Sequence in context: A353494 A190610 A095901 * A358680 A186447 A118009
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Sep 08 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)