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!)
A080545 Characteristic function of {1} union {odd primes}: 1 if n is 1 or an odd prime, else 0. 6

%I #18 Oct 04 2017 09:49:12

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

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

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

%N Characteristic function of {1} union {odd primes}: 1 if n is 1 or an odd prime, else 0.

%H Antti Karttunen, <a href="/A080545/b080545.txt">Table of n, a(n) for n = 1..1001</a>

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

%F a(n) = (delta(Omega(n), 0) + delta(Omega(n), 1)) * d_0(n), where delta is the Kronecker delta function, Omega is the number of prime factors function (counted with multiplicity), and d_0(n) is the least significant digit of n in binary. - _Alonso del Arte_, Nov 19 2013

%e a(2) = 0 because 2 is prime but even.

%e a(3) = 1 because 3 is prime and odd. Likewise for a(5) and a(7).

%e a(4) = 0 because 4 is neither prime nor odd. Likewise for a(6) and a(8).

%e a(9) = 0 because 9 is odd but composite.

%t Table[Boole[PrimeOmega[n] < 2 && OddQ[n]], {n, 100}] (* _Alonso del Arte_, Nov 19 2013 *)

%Y Cf. A010051, A080355, A080339, A080567, A171387.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, Mar 21 2003

%E Added missing a(2) - _Walter Roscello_, Nov 19 2013

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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)