OFFSET
1,1
FORMULA
T(n, 0) = 2.
T(n, k) <= n+1.
EXAMPLE
Triangle T(n, k) begins:
n n-th row
-- ----------------------------------
1 2
2 2, 3
3 2, 2, 2
4 2, 3, 4, 2
5 2, 2, 2, 3, 2
6 2, 2, 2, 3, 2, 3
7 2, 2, 2, 2, 2, 2, 2
8 2, 3, 3, 2, 3, 2, 2, 2
9 2, 2, 2, 5, 2, 3, 3, 2, 2
10 2, 2, 2, 3, 2, 3, 4, 2, 2, 3
11 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2
12 2, 2, 2, 3, 2, 3, 5, 2, 2, 3, 4, 2
MATHEMATICA
T[n_, k_]:=Module[{b=2}, While[DigitSum[n, b]==DigitSum[k, b], b++]; b]; Table[T[n, k], {n, 13}, {k, 0, n-1}]//Flatten (* Stefano Spezia, Jul 12 2024 *)
PROG
(PARI) T(n, k) = { for (b = 2, oo, my (d = sumdigits(n, b) - sumdigits(k, b)); if (d, return (b); ); ); }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jul 07 2024
STATUS
approved