OFFSET
1,2
COMMENTS
In other words, the binary expansion of a(n) encodes a subset of the divisors of n.
This sequence is a permutation of the positive integers with inverse A366028.
LINKS
FORMULA
a(p) = 2^(p-1) for any prime number p.
a(2*p) = 2^(p-1) + 1 for any prime number p.
EXAMPLE
The first terms, alongside their binary expansion and the corresponding divisors d, are:
n a(n) bin(a(n)) Corresponding divisors
-- ------ ------------------- ----------------------
1 1 1 {1}
2 2 10 {2}
3 4 100 {3}
4 3 11 {2, 1}
5 16 10000 {5}
6 5 101 {3, 1}
7 64 1000000 {7}
8 8 1000 {4}
9 256 100000000 {9}
10 17 10001 {5, 1}
11 1024 10000000000 {11}
12 6 110 {3, 2}
13 4096 1000000000000 {13}
14 65 1000001 {7, 1}
15 20 10100 {5, 3}
16 9 1001 {4, 1}
17 65536 10000000000000000 {17}
18 7 111 {3, 2, 1}
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 26 2023
STATUS
approved