

A297404


A binary representation of the positive exponents that appear in the prime factorization of a number, shown in decimal.


3



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, 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, 1, 1, 1, 6, 1, 1, 3, 3, 1, 1, 1, 9, 8, 1, 1, 3, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

This sequence is similar to A087207; here we encode the exponents, there the prime numbers appearing in the prime factorization of a number.
The binary representation of a(n) shows which exponents appear in the prime factorization of n, but without multiplicities:
 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^(k1) = 2^(k1) (where AND denotes the bitwise AND operator),
 conversely, if a(n) AND 2^(k1) = 2^(k1) for some k > 0, then there is prime number p such that p^k divides n but p^(k+1) does not divide n.


LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..10000


FORMULA

a(p^k) = 2^(k1) for any prime number p and k > 0.
a(n^2) = A000695(2 * a(n)) / 2 for any n > 0.
a(n) <= 1 iff n is squarefree (A005117).
a(n) <= 3 iff n is cubefree (A004709).
a(n) is odd iff n belongs to A052485 (weak numbers).
a(n) is even iff n belongs to A001694 (powerful numbers).
a(n) AND 2 = 2 iff n belongs to A038109 (where AND denotes the bitwise AND operator).
A000120(a(n)) <= 1 iff n belongs to A072774 (powers of squarefree numbers).
A000120(a(n)) > 1 iff n belongs to A059404.
If gcd(m, n) = 1, then a(m * n) = a(m) OR a(n) (where OR denotes the bitwise OR operator).


EXAMPLE

For n = 90:
 90 = 5^1 * 3^2 * 2^1,
 the exponents appearing in the prime factorization of 90 are 1 and 2,
 hence a(90) = 2^(11) + 2^(21) = 3.


MATHEMATICA

Array[Total@ Map[2^(#  1) &, Union[FactorInteger[#][[All, 1]] ]]  Boole[# == 1] &, 86] (* Michael De Vlieger, Dec 29 2017 *)


PROG

(PARI) a(n) = my (x=Set(factor(n)[, 2]~)); sum(i=1, #x, 2^(x[i]))/2


CROSSREFS

Cf. A000120, A000695, A001694, A004709, A005117, A038109, A052485, A059404, A087207.
Sequence in context: A162512 A162510 A292589 * A235388 A294897 A252733
Adjacent sequences: A297401 A297402 A297403 * A297405 A297406 A297407


KEYWORD

nonn,easy,base


AUTHOR

Rémy Sigrist, Dec 29 2017


STATUS

approved



