OFFSET
1,4
MATHEMATICA
FractionList[n_] := Module[
{i, j, A},
A = Union[Flatten[Table[j/i, {i, 1, n}, {j, 1, i}]]];
Sort[A,
Denominator[#1] <
Denominator[#2] || (Denominator[#1] ==
Denominator[#2] && #1 < #2) &]
];
DiagDigits[n_, b_] := Module[
{A, B, d},
A = Drop[FractionList[n], 1];
d = Table[RealDigits[A[[i]], b, n, -1][[1, i]], {i, 1, n}]
];
DiagDigits[86, 3]
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Peter Karpov, Feb 23 2016
STATUS
approved