login
A354034
a(n) = 1 if n is an even number or a square, otherwise 0.
1
1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1
OFFSET
0
FORMULA
a(n) = A059841(n) + A098108(n).
For n >= 1, a(n) = 1 - A324908(n).
MATHEMATICA
a[n_] := If[EvenQ[n] || IntegerQ[Sqrt[n]], 1, 0]; Array[a, 100, 0] (* Amiram Eldar, May 16 2022 *)
PROG
(PARI) A354034(n) = (!(n%2) || issquare(n));
CROSSREFS
Characteristic function of A176693.
Cf. A059841, A098108, A324908 (binary complement).
Sequence in context: A359779 A373834 A132194 * A174897 A316441 A190938
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 16 2022
STATUS
approved