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
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
Sequence in context: A286046 A189215 A285128 * A355820 A099991 A091069
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 March 19 06:32 EDT 2024. Contains 370953 sequences. (Running on oeis4.)