OFFSET
1,2
COMMENTS
Note that for odd n, the digits will include n itself.
FORMULA
t(n,m)=Min[2*m - 1, 2*(n - m) + 1]; a(n)=FromDigits[{Table[t[n, m], {m, 1, n}], n}, n].
EXAMPLE
Row 4 of A157454 is 1,3,3,1. 1331 in base 4 = 4^3 + 3*4^2 + 3*4 + 1 = 125, so a(4) = 125.
MATHEMATICA
t[n_, m_] =Min[1 + 2*m, 1 + 2*(n - m)];
Table[FromDigits[{Table[t[n, m], {m, 0, n}], n + 1}, n + 1], {n, 0, 20}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Roger L. Bagula, Mar 01 2009
EXTENSIONS
Edited by Franklin T. Adams-Watters, Sep 25 2011
STATUS
approved