OFFSET
1,2
COMMENTS
The table is:
1, 2, 4, 7, 0, 1, 1, 9, 3, 2,
3, 5, 8, 1, 3, 6, 2, 2, 8, 3,
6, 9, 1, 1, 1, 0, 4, 2, 3, 9,
1, 1, 4, 7, 2, 2, 9, 4, 4, 4,
2, 1, 1, 1, 5, 3, 3, 0, 6, 5,
5, 8, 2, 2, 0, 5, 4, 4, 3, 0,
1, 2, 6, 3, 3, 1, 7, 5, 6, 8,
2, 2, 1, 6, 4, 4, 4, 1, 6, 7,
7, 3, 3, 2, 8, 5, 6, 9, 7, 8,
2, 7, 4, 4, 5, 2, 7, 7, 6, 5, ...
FORMULA
MATHEMATICA
almostNatural[n_, b_] := almostNatural[n, b] = Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; f[n_, m_] := (n + m - 2) (n + m - 1)/2 + m; Array[ almostNatural[ f[#, #], 10] &, 105] (* modified Jun 29 2014 *)
CROSSREFS
KEYWORD
AUTHOR
Robert G. Wilson v, Jun 27 2014
STATUS
approved