A381934 a(n) is the least k > 1 such that the binary expansions of n and n*k have the same number of nonleading zeros.
2, 3, 3, 5, 3, 6, 5, 9, 3, 5, 6, 5, 5, 19, 9, 17, 3, 5, 5, 3, 6, 9, 5, 11, 5, 7, 19, 301, 9, 35, 17, 33, 3, 5, 5, 3, 5, 5, 3, 3, 6, 5, 9, 5, 5, 17, 11, 305, 5, 7, 7, 15, 19, 3, 301, 9, 9, 71, 35, 13, 17, 67, 33, 65, 3, 5, 5, 3, 5, 5, 3, 3, 5, 10, 5, 10, 3, 6
Offset: 0
Examples
The first terms, alongside the binary expansions of n and n*a(n), are: n a(n) bin(n) bin(n*a(n)) -- ---- ------ ----------- 0 2 0 0 1 3 1 11 2 3 10 110 3 5 11 1111 4 3 100 1100 5 6 101 11110 6 5 110 11110 7 9 111 111111 8 3 1000 11000 9 5 1001 101101 10 6 1010 111100 11 5 1011 110111 12 5 1100 111100 13 19 1101 11110111 14 9 1110 1111110 15 17 1111 11111111 16 3 10000 110000
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8192
- Rémy Sigrist, PARI program
Programs
-
PARI
\\ See Links section.
Formula
a(2^n) = 3.
a(2^n - 1) = 2^n + 1.
Comments