Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Jan 23 2025 00:21:52
%S 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,
%T 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,
%U 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
%N 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.
%H Robert Israel, <a href="/A175488/b175488.txt">Table of n, a(n) for n = 1..10011</a> (first 141 rows, flattened)
%F T(2^k * n + j, n) = n for 0 <= j < 2^k. - _Robert Israel_, Jan 21 2025
%e Triangle begins:
%e 1;
%e 1, 2;
%e 1, 1, 3;
%e 1, 2, 1, 4;
%e 1, 2, 1, 2, 5;
%e 1, 2, 3, 2, 2, 6;
%e ...
%p f:= proc(n,m) local s,R,i;
%p for s from ilog2(m)+1 to 1 by -1 do
%p R:= {seq(floor(n/2^i) mod 2^s,i=0 .. ilog2(n)+1-s)}
%p intersect {seq(floor(m/2^i) mod 2^s,i=0 .. ilog2(m)+1-s)};
%p if R <> {} then return max(R) fi
%p od
%p end proc:
%p for n from 1 to 15 do
%p seq(f(n,m),m=1..n)
%p od; # _Robert Israel_, Jan 20 2025
%Y Cf. A007088, A175466.
%K base,tabl,nonn,changed
%O 1,3
%A _Leroy Quet_, May 28 2010
%E Keyword:tabl added and sequences extended by _R. J. Mathar_, Sep 28 2010