login

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”).

Characteristic function of positive integers not prime and not a power of 2.
1

%I #15 Aug 28 2017 09:22:18

%S 0,0,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,

%T 1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,0,1,

%U 1,1,0,1,0,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,0,1,1

%N Characteristic function of positive integers not prime and not a power of 2.

%H Antti Karttunen, <a href="/A202238/b202238.txt">Table of n, a(n) for n = 1..65537</a>

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

%F A111775(n) = 0 if and only if a(n) = 0.

%F A111787(n) = 0 if and only if a(n) = 0.

%F a(n) = 1 for n in A111774. - _Michel Marcus_, Aug 28 2017

%o (PARI) {a(n) = n>0 && !isprime(n) && n != 2^valuation(n, 2)}

%Y Cf. A010051, A111774, A111775, A111787, A209229.

%K nonn,easy

%O 1,1

%A _Michael Somos_, Dec 16 2011