login
A244425
Consider the sequence of almost natural numbers (A007376) and arrange it in a table by antidiagonals; sequence gives the main diagonal.
1
1, 5, 1, 7, 5, 5, 7, 1, 7, 5, 1, 1, 1, 5, 1, 1, 1, 2, 2, 9, 3, 3, 7, 4, 4, 7, 5, 5, 7, 6, 6, 9, 7, 7, 3, 8, 9, 7, 8, 7, 7, 8, 0, 3, 7, 2, 8, 5, 3, 2, 2, 3, 5, 8, 2, 7, 3, 0, 8, 7, 7, 8, 0, 3, 7, 2, 8, 5, 3, 2, 2, 3, 5, 8, 2, 7, 3, 0, 8, 7, 7, 8, 0, 3, 7, 2, 8, 5, 3, 2, 2, 3, 5, 8, 2, 7, 3, 0, 8, 7, 7, 8, 0, 3, 7
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
a(n) = A007376(A001844(n-1)). - Omar E. Pol, Jun 29 2014
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
nonn,base,tabl
AUTHOR
Robert G. Wilson v, Jun 27 2014
STATUS
approved