OFFSET
1,3
COMMENTS
The binary representation of a(n) encodes the colexicographically earliest factorization of n into distinct factors greater than 1.
LINKS
Rémy Sigrist, PARI program for A332306
FORMULA
a(n) = 2^(n-2) iff n is a prime number of the square of a prime number (A000430).
a(n!) = 2^(n-1)-1 for any n > 0.
a(p_1*...*p_k) = 2^(p_1-2)+...+2^(p_k-2) for distinct primes numbers p_1, ..., p_k.
EXAMPLE
The first terms, alongside their binary representations and factorizations, are:
n a(n) bin(a(n)) Factorization
-- ------ ------------------ -------------
1 0 0
2 1 1 2
3 2 10 3
4 4 100 4
5 8 1000 5
6 3 11 2*3
7 32 100000 7
8 5 101 2*4
9 128 10000000 9
10 9 1001 2*5
11 512 1000000000 11
12 6 110 3*4
13 2048 100000000000 13
14 33 100001 2*7
15 10 1010 3*5
16 65 1000001 2*8
17 32768 1000000000000000 17
18 18 10010 3*6
19 131072 100000000000000000 19
20 12 1100 4*5
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 09 2020
STATUS
approved