%I #12 Jul 20 2019 08:06:22
%S 1,1,1,1,2,1,1,1,1,1,1,2,3,2,1,1,2,1,1,2,1,1,2,1,4,1,2,1,1,1,3,2,2,3,
%T 1,1,1,2,3,2,5,2,3,2,1,1,2,1,1,2,2,1,1,2,1,1,2,1,4,1,6,1,4,1,2,1,1,2,
%U 1,4,2,3,3,2,4,1,2,1,1,2,3,2,2,2,7,2,2
%N Table read by antidiagonals: a(m,n) = the largest positive integer occurring, when written in binary, as a substring in both binary m and binary n.
%H Rémy Sigrist, <a href="/A175466/b175466.txt">Table of n, a(n) for n = 1..11325</a>
%H Rémy Sigrist, <a href="/A175466/a175466.png">Colored representation of the table for n = 1..1023 and k = 1023</a>
%F From _Rémy Sigrist_, Jul 20 2019: (Begin)
%F 1 <= a(n, k) <= min(n, k).
%F a(n, k) = a(k, n).
%F a(n, n) = n.
%F a(n, 1) = 1.
%F a(n, 2) = A043529(n).
%F a(n, 3) = 3 iff n belongs to A004780.
%F (End)
%e From _Rémy Sigrist_, Jul 20 2019: (Begin)
%e Table a(n, k) begins (in decimal):
%e n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
%e ---+---------------------------------------------------
%e 1| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
%e 2| 1 2 1 2 2 2 1 2 2 2 2 2 2 2 1
%e 3| 1 1 3 1 1 3 3 1 1 1 3 3 3 3 3
%e 4| 1 2 1 4 2 2 1 4 4 2 2 4 2 2 1
%e 5| 1 2 1 2 5 2 1 2 2 5 5 2 5 2 1
%e 6| 1 2 3 2 2 6 3 2 2 2 3 6 6 6 3
%e 7| 1 1 3 1 1 3 7 1 1 1 3 3 3 7 7
%e 8| 1 2 1 4 2 2 1 8 4 2 2 4 2 2 1
%e 9| 1 2 1 4 2 2 1 4 9 2 2 4 2 2 1
%e 10| 1 2 1 2 5 2 1 2 2 10 5 2 5 2 1
%e 11| 1 2 3 2 5 3 3 2 2 5 11 3 5 3 3
%e 12| 1 2 3 4 2 6 3 4 4 2 3 12 6 6 3
%e 13| 1 2 3 2 5 6 3 2 2 5 5 6 13 6 3
%e 14| 1 2 3 2 2 6 7 2 2 2 3 6 6 14 7
%e 15| 1 1 3 1 1 3 7 1 1 1 3 3 3 7 15
%e Table a(n, k) begins (in binary):
%e n\k| 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
%e ----+----------------------------------------------------------------
%e 1| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
%e 10| 1 10 1 10 10 10 1 10 10 10 10 10 10 10 1
%e 11| 1 1 11 1 1 11 11 1 1 1 11 11 11 11 11
%e 100| 1 10 1 100 10 10 1 100 100 10 10 100 10 10 1
%e 101| 1 10 1 10 101 10 1 10 10 101 101 10 101 10 1
%e 110| 1 10 11 10 10 110 11 10 10 10 11 110 110 110 11
%e 111| 1 1 11 1 1 11 111 1 1 1 11 11 11 111 111
%e 1000| 1 10 1 100 10 10 1 1000 100 10 10 100 10 10 1
%e 1001| 1 10 1 100 10 10 1 100 1001 10 10 100 10 10 1
%e 1010| 1 10 1 10 101 10 1 10 10 1010 101 10 101 10 1
%e 1011| 1 10 11 10 101 11 11 10 10 101 1011 11 101 11 11
%e 1100| 1 10 11 100 10 110 11 100 100 10 11 1100 110 110 11
%e 1101| 1 10 11 10 101 110 11 10 10 101 101 110 1101 110 11
%e 1110| 1 10 11 10 10 110 111 10 10 10 11 110 110 1110 111
%e 1111| 1 1 11 1 1 11 111 1 1 1 11 11 11 111 1111
%e (End)
%o (PARI) sub(n) = { my (b=binary(n), s=[]); for (i=1, #b, if (b[i], for (j=i, #b, s=setunion(s, Set(fromdigits(b[i..j], 2)))))); return (s) }
%o T(n,k) = my (i=setintersect(sub(n), sub(k))); i[#i] \\ _Rémy Sigrist_, Jul 20 2019
%Y Cf. A043529, A004780, A175488.
%K base,nonn,tabl
%O 1,5
%A _Leroy Quet_, May 24 2010
%E More terms from _Rémy Sigrist_, Jul 20 2019
|