A350510 Square array read by descending antidiagonals: A(n,k) is the least number m such that the base-n expansion of m contains the base-n expansions of 1..k as substrings.
1, 2, 1, 6, 5, 1, 12, 11, 6, 1, 44, 38, 27, 7, 1, 44, 95, 75, 38, 8, 1, 92, 285, 331, 194, 51, 9, 1, 184, 933, 1115, 694, 310, 66, 10, 1, 1208, 2805, 4455, 3819, 1865, 466, 83, 11, 1, 1256, 7179, 17799, 16444, 8345, 3267, 668, 102, 12, 1
Offset: 2
Examples
Square array begins: n/k|| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ================================================================| 2 || 1 | 2 | 6 | 12 | 44 | 44 | 92 | 184 | 3 || 1 | 5 | 11 | 38 | 95 | 285 | 933 | 2805 | 4 || 1 | 6 | 27 | 75 | 331 | 1115 | 4455 | 17799 | 5 || 1 | 7 | 38 | 194 | 694 | 3819 | 16444 | 82169 | 6 || 1 | 8 | 51 | 310 | 1865 | 8345 | 55001 | 289577 | 7 || 1 | 9 | 66 | 466 | 3267 | 22875 | 123717 | 947260 | 8 || 1 | 10 | 83 | 668 | 5349 | 42798 | 342391 | 2177399 | 9 || 1 | 11 | 102 | 922 | 8303 | 74733 | 672604 | 6053444 | 10 || 1 | 12 | 123 | 1234 | 12345 | 123456 | 1234567 | 12345678 | 11 || 1 | 13 | 146 | 1610 | 17715 | 194871 | 2143588 | 23579476 |
Links
Crossrefs
Programs
-
Mathematica
T[n_,k_]:=(m=0;While[!ContainsAll[Subsequences@IntegerDigits[++m,n],IntegerDigits[Range@k,n]]];m);Flatten@Table[T[1+i,j+1-i],{j,9},{i,j}] (* Giorgos Kalogeropoulos, Jan 09 2022 *)
-
PARI
A350510_rows(n,k,N=0)= my(L=List(concat(apply(z->fromdigits([1..z],n),[1..n-1]),if(n>2,fromdigits(concat([1,0],[2..n-1]),n),[]))),T1(x)=digits(x,n),T2(x)=fromdigits(x,n),A(x)=my(S=T1(x));setbinop((y,z)->T2(S[y..z]),[1..#S]),N=if(N,N,L[#L]),A1=A(N));while(#L
setsearch(A1,z),[1..#L+1])),A1=A(N++));listput(L,N));Vec(L)