[go: up one dir, main page]

login
A376424
Nonnegative numbers m such that the run lengths in binary expansion of m, say (r_1, ..., r_k), satisfy r_1 + ... + r_i <> r_j + ... + r_k for any i in the interval 1..k-1 and j in the interval 2..k.
1
0, 1, 3, 4, 6, 7, 8, 14, 15, 16, 19, 23, 24, 25, 28, 29, 30, 31, 32, 35, 47, 48, 49, 60, 61, 62, 63, 64, 67, 68, 71, 76, 79, 80, 88, 95, 96, 97, 102, 103, 110, 111, 112, 113, 114, 115, 120, 121, 122, 123, 124, 125, 126, 127, 128, 131, 132, 135, 156, 159, 160
OFFSET
1,3
COMMENTS
Visually, if we consider a row of bricks of widths r_1, ..., r_k (in that order) above a row of widths r_k, ..., r_1 (in that order), we never have 4 bricks whose corners meet.
There are A108411(k) terms with k binary digits (ignoring leading zeros).
EXAMPLE
The binary expansion of 35 is "100011", the corresponding run lengths are (1, 3, 2); the sums 1, 1+3 are distinct from the sums 3+2, 2, so 35 is a term. Visually, if we consider a row of bricks of widths 1, 3, 2 (in that order) above a row of widths 2, 3, 1 (in that order), we never have 4 bricks whose corners meet:
.-.-----.---.
| | | |
.-.-.---.-.-.
| | | |
.---.-----.-.
PROG
(PARI) toruns(n) = { my (r = []); while (n, my (v = valuation(n+n%2, 2)); n \= 2^v; r = concat(v, r)); r }
is(n) = { if (n, my (r = toruns(n)); setintersect(vector(#r, k, vecsum(r[1..k])), vector(#r, k, vecsum(r[#r+1-k..#r])))==[vecsum(r)], 1); }
CROSSREFS
Sequence in context: A239458 A007370 A322376 * A044813 A154661 A275672
KEYWORD
nonn,base,new
AUTHOR
Rémy Sigrist, Sep 22 2024
STATUS
approved