%I #59 May 26 2024 15:55:55
%S 1,2,1,3,11,1,4,2,11,1,5,21,12,11,1,6,3,2,12,11,1,7,31,21,13,12,11,1,
%T 8,4,22,2,13,12,11,1,9,41,3,21,14,13,12,11,1,10,5,31,22,2,14,13,12,11,
%U 1,11,51,32,23,21,15,14,13,12,11,1,12,6,4,3,22,2,15,14,13,12,11,1
%N Triangle read by rows: T(n, k) is equal to n/k if k | n, else to the concatenation of A003988(n, k) = floor(n/k) and A051127(k, n) = n mod k.
%H Stefano Spezia, <a href="/A372523/b372523.txt">First 150 rows of the triangle, flattened</a>
%F T(n, k) = floor(n/k)*10^(1+floor(log10(n mod k))) + (n mod k) if n is not divisible by k.
%F T(n, n) = 1.
%F T(n, 1) = n.
%F T(n, k) = 2*T(n-k, k) - T(n-2*k, k) for n >= 3*k.
%F T(n, k) = [x^n] x^k*(1 + (Sum_{i=1..k-1} (i + 10^(1+floor(log10(n mod k))))*x^i) - (Sum_{i=1..k-1} i*x^(k+i)))/(1 - x^k)^2.
%e The triangle begins:
%e 1;
%e 2, 1;
%e 3, 11, 1;
%e 4, 2, 11, 1;
%e 5, 21, 12, 11, 1;
%e 6, 3, 2, 12, 11, 1;
%e 7, 31, 21, 13, 12, 11, 1;
%e ...
%t T[n_,k_]:=If[Divisible[n,k],n/k,FromDigits[Join[IntegerDigits[Floor[n/k]],IntegerDigits[Mod[n,k]]]]]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
%t T[n_,k_]:=Floor[n/k]10^IntegerLength[Mod[n,k]]+Mod[n,k]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
%t T[n_, k_]:=SeriesCoefficient[x^k(1+Sum[(i + 10^(1+Floor[Log10[Mod[n,k]]]))*x^i, {i, k-1}] - Sum[i*x^(k+i), {i, k-1}])/(1-x^k)^2, {x, 0, n}]; Table[T[n, k], {n, 12}, {k, n}]//Flatten
%Y Cf. A003988, A004216, A051127, A055642.
%Y Cf. A000012 (right diagonal), A000027 (1st column).
%Y Cf. A048158, A051126, A051127, A234575.
%K nonn,base,easy,look,tabl
%O 1,2
%A _Stefano Spezia_, May 04 2024