login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356149 Irregular table T(n, k), n > 0, k = 1..A356148(n), read by rows; the n-th row contains, in ascending order, the distinct positive integers whose binary expansion appears as a substring in the binary expansion of n or its complement. 3
1, 1, 2, 1, 3, 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 6, 1, 3, 7, 1, 2, 3, 4, 7, 8, 1, 2, 3, 4, 6, 9, 1, 2, 5, 10, 1, 2, 3, 4, 5, 11, 1, 2, 3, 4, 6, 12, 1, 2, 3, 5, 6, 13, 1, 2, 3, 6, 7, 14, 1, 3, 7, 15, 1, 2, 3, 4, 7, 8, 15, 16, 1, 2, 3, 4, 6, 7, 8, 14, 17, 1, 2, 3, 4, 5, 6, 9, 13, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Leading 0's in binary expansions are ignored.
The n-th contains the n-th row of A165416.
LINKS
FORMULA
T(n, 1) = 1.
T(n, A356148(n)) = n.
EXAMPLE
Table T(n, k) begins:
1;
1, 2;
1, 3;
1, 2, 3, 4;
1, 2, 5;
1, 2, 3, 6;
1, 3, 7;
1, 2, 3, 4, 7, 8;
1, 2, 3, 4, 6, 9;
1, 2, 5, 10;
1, 2, 3, 4, 5, 11;
1, 2, 3, 4, 6, 12;
1, 2, 3, 5, 6, 13;
1, 2, 3, 6, 7, 14;
1, 3, 7, 15;
1, 2, 3, 4, 7, 8, 15, 16;
...
PROG
(PARI) row(n) = { my (b=binary(n)); setbinop((i, j) -> my (s=fromdigits(b[i..j], 2)); if (b[i], s, 2^(j-i+1)-1-s), [1..#b]) }
(Python)
def row(n):
N = n.bit_length()
c, s = ((1<<N)-1)^n, set()
for i in range(N):
for l in range(N-i):
mask = ((2<<l)-1) << i
s.add((mask&n) >> i)
s.add((mask&c) >> i)
return sorted(s - {0})
print([t for r in range(19) for t in row(r)]) # Michael S. Branicky, Jul 28 2022
CROSSREFS
Sequence in context: A277427 A231631 A280700 * A038566 A020652 A293248
KEYWORD
nonn,base,tabf
AUTHOR
Rémy Sigrist, Jul 28 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:19 EDT 2024. Contains 371905 sequences. (Running on oeis4.)