OFFSET
1,2
MAPLE
A101261 := proc(nmax) local a, n, anex ; a := [1, 2] ; while nops(a) < nmax do if nops(a) mod 2 = 0 then a := [op(a), 1] ; else n := (nops(a)+1)/2 ; n := op(n, a) ; anex := 2 ; while anex in a or n > 1 do if not anex in a then n := n-1 ; fi ; anex := anex+1 ; od ; a := [op(a), anex] ; fi ; od ; RETURN(a) ; end: A101905 := proc(nmax) local a, n, anex ; a := A101261(2*nmax) ; for n from 2*nmax-1 to 3 by -2 do a := subsop(n=NULL, a) ; od ; RETURN(a) ; end: a := A101905(80) ; n:= 1: while member(n, a, 'ninv') do printf("%d, ", ninv) ; n := n+1 : od : # R. J. Mathar, May 02 2007
CROSSREFS
KEYWORD
easy,less,nonn
AUTHOR
Leroy Quet, Dec 20 2004
EXTENSIONS
More terms from R. J. Mathar, May 02 2007
More terms from David Wasserman, Mar 31 2008
STATUS
approved