OFFSET
1,2
FORMULA
t(n,m)== Min[1 + Floor[m/2], 1 + Floor[(n - m)/2]]; a(n)=FromDigits[{Table[t[n, m], {m, 0, n}], n + 1}, n + 1].
EXAMPLE
Row 5 of A139038 is 1,1,2,1,1. 11211 in base 5 = 5^4 + 5^3 + 2*5^2 + 5 + 1 = 806, so a(5) = 806.
MATHEMATICA
t[n_, m_] = Min[Floor[(m+1)/2], 1 + Floor[(n - m)/2]];
Table[FromDigits[{Table[t[n, m], {m, 1, n}], n}, n], {n, 1, 21}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Roger L. Bagula, Mar 01 2009
EXTENSIONS
Edited by Franklin T. Adams-Watters, Sep 25 2011
STATUS
approved