|
|
A359832
|
|
a(n) = 1 if the 2-adic valuation of n is either 0 or odd, otherwise 0.
|
|
7
|
|
|
1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(2^e) = 1 if e is odd, and 0 if e is even (and > 0), with a(p^e) = 1 for all odd primes p.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/6. - Amiram Eldar, Jan 24 2023
|
|
MATHEMATICA
|
a[n_] := If[(e = IntegerExponent[n, 2]) == 0 || OddQ[e], 1, 0]; Array[a, 100] (* Amiram Eldar, Jan 24 2023 *)
|
|
PROG
|
(PARI) A359832(n) = (!(n=valuation(n, 2))||(n%2));
(PARI) A359832(n) = { my(f=factor(n)); prod(k=1, #f~, ((2!=f[k, 1]) || (f[k, 2]%2))); };
(Python)
|
|
CROSSREFS
|
Characteristic function of A359794.
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|