OFFSET
1,2
MAPLE
A026400 := proc(nmax) local a, n, lup, k, p ; a := [1, seq(0, i=2..nmax)] ; n := 2 ; while 0 in a do lup := 1 ; while op(lup, a) <> 0 do lup := lup+1 ; od; a := subsop(lup=n, a) ; for k from 2 to n do p := lup+(k-1)*n ; while p <= nmax and op(p, a) <> 0 do p := p+1 ; od: if p <= nmax then a := subsop(p=n, a) ; else break ; fi ; od: n := n+1 ; end: RETURN(a) ; end: A026400(300) ; # R. J. Mathar, Nov 30 2008
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Formula in definition corrected by R. J. Mathar, Nov 30 2008
STATUS
approved