OFFSET
0,3
FORMULA
if(n==0), a(0)=0; else a(n)=10^n*a(n-1)+1
EXAMPLE
For example, the first 4 strings are: '1' (length 1, nonzero index 1), '101' (length 3, nonzero indices 1,3), '101001' (length 6, nonzero indices 1,3,6) '1010010001' (length 10, nonzero indices 1,3,6,10)
MATHEMATICA
f[n_] := Block[{a = {1}}, Do[a = Join[a, Table[0, {i}], {1}], {i, 1, n}]; FromDigits[a]]; Table[ f[n], {n, 0, 8}]
PROG
(PARI) a(n)=if(n<1, 0, 1+a(n-1)*10^n)
(PARI) a(n)=subst( Polrev( Vec( sum(k=1, n, x^(k*(k+1)/2)))), x, 10)
(MATLAB) function ans=bstn(n) if(n==0), ans=0; else, ans=10^n*bstn(n-1)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Kyle Hunter (hunterk(AT)raytheon.com), Oct 31 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Oct 31 2002
STATUS
approved