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!)
A359549 a(n) = 1 if n is either an odd squarefree number squared or twice such a number, otherwise 0. 5
1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
Multiplicative with a(2^e) = 1 if e=1, a(2^e) = 0 if e > 1, and for odd primes p, a(p^e) = 1 if e=2, a(p^e) = 0 if e=1 or e>2.
a(n) = abs(A359548(n)) = A359548(n) mod 2.
a(n) = A046692(n) mod 2 = A327276(n) mod 2 = A327278(n) mod 2.
MATHEMATICA
a[n_] := If[(e = IntegerExponent[n, 2]) < 2 && SquareFreeQ[Sqrt[n/2^e]], 1, 0] ; Array[a, 100] (* Amiram Eldar, Jan 07 2023 *)
PROG
(PARI) A359549(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], (1==f[k, 2]), (2==f[k, 2]))); };
(Python)
from sympy import factorint
def A359549(n): return int((m:=(~n & n-1).bit_length())<2 and all(e==2 for e in factorint(n>>m).values())) # Chai Wah Wu, Jan 11 2023
CROSSREFS
Characteristic function of A359580.
Absolute values of A359548, also their parity.
Parity of A046692, A327276, A327278.
Cf. A227291, A359818 (Dirichlet inverse).
Sequence in context: A167700 A010057 A359548 * A359773 A359774 A204220
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 06 2023
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 July 24 22:37 EDT 2024. Contains 374585 sequences. (Running on oeis4.)