%I #22 Oct 02 2023 20:53:02
%S 0,1,1,2,1,1,1,4,2,1,1,3,1,1,1,8,1,3,1,3,1,1,1,5,2,1,4,3,1,1,1,16,1,1,
%T 1,2,1,1,1,5,1,1,1,3,3,1,1,9,2,3,1,3,1,5,1,5,1,1,1,3,1,1,3,32,1,1,1,3,
%U 1,1,1,6,1,1,3,3,1,1,1,9,8,1,1,3,1,1
%N A binary representation of the positive exponents that appear in the prime factorization of a number, shown in decimal.
%C This sequence is similar to A087207; here we encode the exponents, there the prime numbers appearing in the prime factorization of a number.
%C The binary representation of a(n) shows which exponents appear in the prime factorization of n, but without multiplicities:
%C - for any prime number p and k > 0, if p^k divides n but p^(k+1) does not divide n, then a(n) AND 2^(k-1) = 2^(k-1) (where AND denotes the bitwise AND operator),
%C - conversely, if a(n) AND 2^(k-1) = 2^(k-1) for some k > 0, then there is prime number p such that p^k divides n but p^(k+1) does not divide n.
%H Rémy Sigrist, <a href="/A297404/b297404.txt">Table of n, a(n) for n = 1..10000</a>
%F a(p^k) = 2^(k-1) for any prime number p and k > 0.
%F a(n^2) = A000695(2 * a(n)) / 2 for any n > 0.
%F a(n) <= 1 iff n is squarefree (A005117).
%F a(n) <= 3 iff n is cubefree (A004709).
%F a(n) is odd iff n belongs to A052485 (weak numbers).
%F a(n) is even iff n belongs to A001694 (powerful numbers).
%F a(n) AND 2 = 2 iff n belongs to A038109 (where AND denotes the bitwise AND operator).
%F A000120(a(n)) <= 1 iff n belongs to A072774 (powers of squarefree numbers).
%F A000120(a(n)) > 1 iff n belongs to A059404.
%F If gcd(m, n) = 1, then a(m * n) = a(m) OR a(n) (where OR denotes the bitwise OR operator).
%F a(n) = a(A328400(n)). - _Peter Munn_, Oct 02 2023
%e For n = 90:
%e - 90 = 5^1 * 3^2 * 2^1,
%e - the exponents appearing in the prime factorization of 90 are 1 and 2,
%e - hence a(90) = 2^(1-1) + 2^(2-1) = 3.
%t Array[Total@ Map[2^(# - 1) &, Union[FactorInteger[#][[All, -1]] ]] - Boole[# == 1] &, 86] (* _Michael De Vlieger_, Dec 29 2017 *)
%o (PARI) a(n) = my (x=Set(factor(n)[,2]~)); sum(i=1, #x, 2^(x[i]))/2
%Y Cf. A000120, A000695, A001694, A004709, A005117, A038109, A052485, A059404, A087207, A328400.
%K nonn,easy,base
%O 1,4
%A _Rémy Sigrist_, Dec 29 2017