login
A355823
a(n) = 1 if all exponents in prime factorization of n are powers of 2, otherwise 0.
4
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0
OFFSET
1
FORMULA
Multiplicative with a(p^e) = A209229(e).
For all n >= 1, A302777(n) <= a(n) <= A355825(n).
a(n) = A091862(A225546(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A271727. - Amiram Eldar, Jul 23 2022
EXAMPLE
For n = 8 = 2^3, a(8) = 0 as 3 is not a power of 2 (in A000079).
MATHEMATICA
a[n_] := If[AllTrue[FactorInteger[n][[;; , 2]], # == 2^IntegerExponent[#, 2] &], 1, 0]; Array[a, 100] (* Amiram Eldar, Jul 19 2022 *)
PROG
(PARI) A355823(n) = factorback(apply(e->!bitand(e, e-1), factor(n)[, 2]));
CROSSREFS
Characteristic function of A138302, "Exponentially 2^n-numbers".
Cf. A000079, A091862, A209229, A225546, A271727, A302777, A355824 (Dirichlet inverse).
Differs from related A355825 for the first time at n=128, where a(128) = 0, while A355825(128) = 1.
Sequence in context: A077010 A330548 A225817 * A355825 A332732 A248863
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jul 19 2022
STATUS
approved