login
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.
2

%I #35 Feb 02 2022 23:53:36

%S 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,

%T 9,1,184,933,1115,694,310,66,10,1,1208,2805,4455,3819,1865,466,83,11,

%U 1,1256,7179,17799,16444,8345,3267,668,102,12,1

%N 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.

%H Davis Smith, <a href="/A350510/a350510_1.txt">Upper bounds for A350510(n, k) and various conjectured patterns</a>.

%F For k < n, A(n,k) = A(n,k - 1)*n + k = Sum_{i=1..k} i*(n^(k - i)).

%F A(n,n) = A049363(n).

%F A(n,2) = A057544(n).

%F For n > 3, A(n,3) = A102305(n).

%F A(n,n - 1) = A023811(n).

%e Square array begins:

%e n/k|| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

%e ================================================================|

%e 2 || 1 | 2 | 6 | 12 | 44 | 44 | 92 | 184 |

%e 3 || 1 | 5 | 11 | 38 | 95 | 285 | 933 | 2805 |

%e 4 || 1 | 6 | 27 | 75 | 331 | 1115 | 4455 | 17799 |

%e 5 || 1 | 7 | 38 | 194 | 694 | 3819 | 16444 | 82169 |

%e 6 || 1 | 8 | 51 | 310 | 1865 | 8345 | 55001 | 289577 |

%e 7 || 1 | 9 | 66 | 466 | 3267 | 22875 | 123717 | 947260 |

%e 8 || 1 | 10 | 83 | 668 | 5349 | 42798 | 342391 | 2177399 |

%e 9 || 1 | 11 | 102 | 922 | 8303 | 74733 | 672604 | 6053444 |

%e 10 || 1 | 12 | 123 | 1234 | 12345 | 123456 | 1234567 | 12345678 |

%e 11 || 1 | 13 | 146 | 1610 | 17715 | 194871 | 2143588 | 23579476 |

%t 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 *)

%o (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<k,while(!vecmin(apply(z->setsearch(A1,z),[1..#L+1])),A1=A(N++));listput(L,N));Vec(L)

%Y Cf. A023811, A035239, A049363, A056744, A057544, A061845, A102305.

%Y The first n - 1 terms of rows: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447.

%K nonn,base,tabl

%O 2,2

%A _Davis Smith_, Jan 02 2022