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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..1001

Index entries for characteristic functions

FORMULA

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

EXAMPLE

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

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

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

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

MATHEMATICA

Table[Boole[PrimeOmega[n] < 2 && OddQ[n]], {n, 100}] (* Alonso del Arte, Nov 19 2013 *)

CROSSREFS

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

Sequence in context: A286046 A189215 A285128 * A099991 A091069 A318608

Adjacent sequences:  A080542 A080543 A080544 * A080546 A080547 A080548

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Mar 21 2003

EXTENSIONS

Added missing a(2) - Walter Roscello, Nov 19 2013

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 June 26 13:04 EDT 2022. Contains 354883 sequences. (Running on oeis4.)