|
|
A372523
|
|
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.
|
|
1
|
|
|
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, 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, 1, 11, 51, 32, 23, 21, 15, 14, 13, 12, 11, 1, 12, 6, 4, 3, 22, 2, 15, 14, 13, 12, 11, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = floor(n/k)*10^(1+floor(log10(n mod k))) + (n mod k) if n is not divisible by k.
T(n, n) = 1.
T(n, 1) = n.
T(n, k) = 2*T(n-k, k) - T(n-2*k, k) for n >= 3*k.
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.
|
|
EXAMPLE
|
The triangle begins:
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;
...
|
|
MATHEMATICA
|
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[n_, k_]:=Floor[n/k]10^IntegerLength[Mod[n, k]]+Mod[n, k]; Table[T[n, k], {n, 12}, {k, n}]//Flatten (* or *)
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|