The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #18 Jan 19 2024 04:55:35

%S 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 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 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 Characteristic sequence for numbers n>=0 that are either squares or have a square > 1 as factor.

%C a(0)=1, a(1)=1, n>=2: a(n)=1 if isquarefree(n)=false else 0.

%C Except for a(0)=1 and a(1)=1 this is the bit-flipped unsigned Moebius sequence abs(A008683(n)), n>=2.

%C For n>=2: a(n)=1 iff n is from A013929 (not squarefree).

%H Antti Karttunen, <a href="/A087049/b087049.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.

%F a(n) = 1 if n is a perfect square (A000290) or has some square > 1 as a factor, else 0.

%F a(0) = a(1) = 1; for n > 1, a(n) = 1 - A008966(n). - _Antti Karttunen_, Nov 17 2017

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 1 - 6/Pi^2 (A229099). - _Amiram Eldar_, Jan 19 2024

%e a(4) = 1 because 4 is a square; a(8) = 1 because 8 = 2^2 * 2.

%p 1,1,seq(`if`(numtheory:-issqrfree(n),0,1),n=2..100); # _Robert Israel_, Nov 17 2017

%t Array[If[# <= 1, 1, 1 - Abs@ MoebiusMu@ #] &, 105, 0] (* _Michael De Vlieger_, Nov 17 2017 *)

%o (PARI) A087049(n) = if(n<=1,1,1-abs(moebius(n))); \\ _Antti Karttunen_, Nov 17 2017

%Y Cf. A008683, A008966, A080733, A000290 (squares), A013929 (not squarefree), A229099.

%K nonn,easy

%O 0,1

%A _Wolfdieter Lang_, Sep 08 2003

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 May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)