Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 May 17 2022 17:50:01
%S 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,
%T 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,
%U 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
%N a(n) = 1 if n is an even number or a square, otherwise 0.
%H Antti Karttunen, <a href="/A354034/b354034.txt">Table of n, a(n) for n = 0..65537</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = A059841(n) + A098108(n).
%F For n >= 1, a(n) = 1 - A324908(n).
%t a[n_] := If[EvenQ[n] || IntegerQ[Sqrt[n]], 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, May 16 2022 *)
%o (PARI) A354034(n) = (!(n%2) || issquare(n));
%Y Characteristic function of A176693.
%Y Cf. A059841, A098108, A324908 (binary complement).
%K nonn
%O 0
%A _Antti Karttunen_, May 16 2022