OFFSET
1,5
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..11325
FORMULA
From Rémy Sigrist, Jul 20 2019: (Begin)
1 <= a(n, k) <= min(n, k).
a(n, k) = a(k, n).
a(n, n) = n.
a(n, 1) = 1.
a(n, 2) = A043529(n).
a(n, 3) = 3 iff n belongs to A004780.
(End)
EXAMPLE
From Rémy Sigrist, Jul 20 2019: (Begin)
Table a(n, k) begins (in decimal):
n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---+---------------------------------------------------
1| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2| 1 2 1 2 2 2 1 2 2 2 2 2 2 2 1
3| 1 1 3 1 1 3 3 1 1 1 3 3 3 3 3
4| 1 2 1 4 2 2 1 4 4 2 2 4 2 2 1
5| 1 2 1 2 5 2 1 2 2 5 5 2 5 2 1
6| 1 2 3 2 2 6 3 2 2 2 3 6 6 6 3
7| 1 1 3 1 1 3 7 1 1 1 3 3 3 7 7
8| 1 2 1 4 2 2 1 8 4 2 2 4 2 2 1
9| 1 2 1 4 2 2 1 4 9 2 2 4 2 2 1
10| 1 2 1 2 5 2 1 2 2 10 5 2 5 2 1
11| 1 2 3 2 5 3 3 2 2 5 11 3 5 3 3
12| 1 2 3 4 2 6 3 4 4 2 3 12 6 6 3
13| 1 2 3 2 5 6 3 2 2 5 5 6 13 6 3
14| 1 2 3 2 2 6 7 2 2 2 3 6 6 14 7
15| 1 1 3 1 1 3 7 1 1 1 3 3 3 7 15
Table a(n, k) begins (in binary):
n\k| 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
----+----------------------------------------------------------------
1| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
10| 1 10 1 10 10 10 1 10 10 10 10 10 10 10 1
11| 1 1 11 1 1 11 11 1 1 1 11 11 11 11 11
100| 1 10 1 100 10 10 1 100 100 10 10 100 10 10 1
101| 1 10 1 10 101 10 1 10 10 101 101 10 101 10 1
110| 1 10 11 10 10 110 11 10 10 10 11 110 110 110 11
111| 1 1 11 1 1 11 111 1 1 1 11 11 11 111 111
1000| 1 10 1 100 10 10 1 1000 100 10 10 100 10 10 1
1001| 1 10 1 100 10 10 1 100 1001 10 10 100 10 10 1
1010| 1 10 1 10 101 10 1 10 10 1010 101 10 101 10 1
1011| 1 10 11 10 101 11 11 10 10 101 1011 11 101 11 11
1100| 1 10 11 100 10 110 11 100 100 10 11 1100 110 110 11
1101| 1 10 11 10 101 110 11 10 10 101 101 110 1101 110 11
1110| 1 10 11 10 10 110 111 10 10 10 11 110 110 1110 111
1111| 1 1 11 1 1 11 111 1 1 1 11 11 11 111 1111
(End)
PROG
(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) }
T(n, k) = my (i=setintersect(sub(n), sub(k))); i[#i] \\ Rémy Sigrist, Jul 20 2019
CROSSREFS
KEYWORD
AUTHOR
Leroy Quet, May 24 2010
EXTENSIONS
More terms from Rémy Sigrist, Jul 20 2019
STATUS
approved