A175488 Triangle read by rows: T(n,m) = the largest positive integer that, when written in binary, occurs as a substring both in binary m and in binary n.
1, 1, 2, 1, 1, 3, 1, 2, 1, 4, 1, 2, 1, 2, 5, 1, 2, 3, 2, 2, 6, 1, 1, 3, 1, 1, 3, 7, 1, 2, 1, 4, 2, 2, 1, 8, 1, 2, 1, 4, 2, 2, 1, 4, 9, 1, 2, 1, 2, 5, 2, 1, 2, 2, 10, 1, 2, 3, 2, 5, 3, 3, 2, 2, 5, 11, 1, 2, 3, 4, 2, 6, 3, 4, 4, 2, 3, 12, 1, 2, 3, 2, 5, 6, 3, 2, 2, 5, 5, 6, 13, 1, 2, 3, 2, 2, 6, 7, 2, 2, 2, 3, 6, 6, 14
Offset: 1
Examples
Triangle begins: 1; 1, 2; 1, 1, 3; 1, 2, 1, 4; 1, 2, 1, 2, 5; 1, 2, 3, 2, 2, 6; ...
Links
- Robert Israel, Table of n, a(n) for n = 1..10011 (first 141 rows, flattened)
Programs
-
Maple
f:= proc(n,m) local s,R,i; for s from ilog2(m)+1 to 1 by -1 do R:= {seq(floor(n/2^i) mod 2^s,i=0 .. ilog2(n)+1-s)} intersect {seq(floor(m/2^i) mod 2^s,i=0 .. ilog2(m)+1-s)}; if R <> {} then return max(R) fi od end proc: for n from 1 to 15 do seq(f(n,m),m=1..n) od; # Robert Israel, Jan 20 2025
Formula
T(2^k * n + j, n) = n for 0 <= j < 2^k. - Robert Israel, Jan 21 2025
Extensions
Keyword:tabl added and sequences extended by R. J. Mathar, Sep 28 2010