OFFSET
1,2
COMMENTS
Any integer appear in the sequence:
- for any m > 0 with binary expansion Sum_{k >= 0} b_k * 2^k,
- let n = (Sum_{k >= 0} b_k * 2^Sum_{j >= k} ((1+j) * b_j))/2,
- then a(n) = m,
- for example (in binary): a("1101000") = "1" + "10" + "1000" = "1011".
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..8192
Rémy Sigrist, PARI program for A309079
FORMULA
EXAMPLE
The first terms, alongside the corresponding finite sequences, are:
n a(n) bin(n) bin(seq)
-- ---- ------ --------
1 1 1 (1)
2 2 10 (10)
3 3 11 (11)
4 4 100 (100)
5 5 101 (101)
6 3 110 (1,10)
7 4 111 (1,11)
8 8 1000 (1000)
9 9 1001 (1001)
10 10 1010 (1010)
11 5 1011 (10,11)
12 5 1100 (1,100)
13 6 1101 (1,101)
14 7 1110 (1,110)
15 8 1111 (1,111)
16 16 10000 (10000)
17 17 10001 (10001)
18 18 10010 (10010)
19 19 10011 (10011)
20 6 10100 (10,100)
21 7 10101 (10,101)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 11 2019
STATUS
approved