OFFSET
2,2
EXAMPLE
T(2, 1) = 9 = 3^2 -> 1001_2 = 11_2^2, have the digit 1 in common, and no lesser composite has this property.
T(6, 2) = 33 = 3 * 11 -> 53_6 = 3_6 * 15_6, have this 2 digits 3 and 5 in common, and no lesser composite has this property.
T(11, 6) = 174752 = 2^5 * 43 * 127 -> 10A326_11 = 2_11^5 * 3A_11 * 106_11, have the 6 digits 0, 1, 2, 3, 6 and A in common, and no lesser composite has this property.
The array begins:
n\k:0, 1, 2, 3, 4, 5, 6,
2: -1, 9, 4;
3: 4, 8, 6, 15;
4: 4, 6, 14, 30, 114;
5: 4, 12, 10, 35, 190, 894;
6: 4, 8, 33, 188, 377, 2355, 13155;
PROG
(PARI)card(base, x)=my(m=factor(x), u=[], v=[], w=[]); my(u=Set(digits(x, base))); for(i=1, #m~, w=Set(digits(m[i, 1], base)); v=setunion(v, w)); #setintersect(u, v)
T(n, k)=my(x); if(k>n, return(0)); if(n==2&&k==0, return(-1)); forcomposite(m=max(2, n^(k-1)), oo, x=card(n, m); if(x==k, return(m)))
CROSSREFS
KEYWORD
AUTHOR
Jean-Marc Rebert, Jul 01 2024
STATUS
approved