OFFSET
1,3
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Colored logarithmic scatterplot of the first 100000 terms (where the color is function of the Hamming weight of A109812(n))
Rémy Sigrist, C++ program
FORMULA
a(n) <= n-1 with equality iff A109812(n) is a power of 2.
EXAMPLE
The first terms, alongside the binary expansion of A109812(n) and the corresponding k's, are:
n a(n) bin(b(n)) k's
-- ---- --------- -----------------------------------------------
1 0 1 []
2 1 10 [1]
3 2 100 [1, 2]
4 1 11 [3]
5 4 1000 [1, 2, 3, 4]
6 2 101 [2, 5]
7 3 1010 [1, 3, 6]
8 7 10000 [1, 2, 3, 4, 5, 6, 7]
9 3 110 [1, 5, 8]
10 4 1001 [2, 3, 8, 9]
11 5 10010 [1, 3, 5, 6, 10]
12 5 1100 [1, 2, 4, 8, 11]
13 6 10001 [2, 3, 5, 7, 9, 12]
14 3 1110 [1, 8, 13]
15 14 100000 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
16 3 111 [5, 8, 15]
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 03 2022
STATUS
approved