login
A306231
Lexicographically earliest sequence of distinct positive terms such that for any n > 0 and any k > 0, floor((2^k) / a(n)) AND floor((2^k) / a(n+1)) = 0 (where AND denotes the bitwise AND operator).
5
1, 2, 3, 6, 4, 5, 20, 8, 9, 72, 16, 7, 14, 21, 78, 32, 11, 352, 64, 10, 40, 15, 24, 12, 30, 35, 390, 48, 96, 51, 102, 60, 13, 832, 117, 144, 18, 168, 42, 28, 39, 180, 56, 84, 63, 70, 780, 120, 26, 128, 19, 504, 36, 288, 126, 45, 112, 151, 896, 156, 720, 224
OFFSET
1,2
COMMENTS
In other words, for any n > 0, the binary expansions of 1/a(n) and of 1/a(n+1) have no common one bit; in this sense, this sequence is similar to A109812.
This sequence is a permutation of the natural numbers, with inverse A306233 (we can first prove that all the powers of 2 appear in the sequence and then that every natural number appear in the sequence).
FORMULA
For any n > 0, if A000120(a(n)) <> 1 and A000120(a(n+1)) <> 1, then gcd(A007733(a(n)), A007733(a(n+1))) > 1.
EXAMPLE
The first terms, alongside A007733(a(n)) and the binary representation of 1/a(n) with periodic part in parentheses, are:
n a(n) period bin(1/a(n))
-- ---- ------ -------------------
1 1 1 1.(0)
2 2 1 0.1(0)
3 3 2 0.(01)
4 6 2 0.0(01)
5 4 1 0.01(0)
6 5 4 0.(0011)
7 20 4 0.00(0011)
8 8 1 0.001(0)
9 9 6 0.(000111)
10 72 6 0.000(000111)
11 16 1 0.0001(0)
12 7 3 0.(001)
13 14 3 0.0(001)
14 21 6 0.(000011)
15 78 12 0.0(000001101001)
16 32 1 0.00001(0)
17 11 10 0.(0001011101)
18 352 10 0.00000(0001011101)
19 64 1 0.000001(0)
20 10 4 0.0(0011)
PROG
(PARI) See Links section.
CROSSREFS
Cf. A000120, A007733, A109812, A306233 (inverse).
Sequence in context: A353590 A209775 A360599 * A125703 A349381 A156688
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 30 2019
STATUS
approved