|
|
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|