OFFSET
1,2
COMMENTS
PROG
(BASIC)
rem Chipmunk BASIC v3.6.4(b8) http://www.nicholson.com/rhn/basic/
max=1000 : dim a(max)
s=2 : z=1 : a(z)=1 : print str$(z)+", ";
for n=1 to 200
x=z-s : if x <= 0 then goto yyy
if a(x)=0 then a(x)=1 : print str$(x)+", "; : s=s+1 : z=x : goto xxx
yyy: for i=0 to max
x=z+s+i
if a(x)=0 then a(x)=1 : print str$(x)+", "; : s=s+i+1 : z=x : goto xxx
next i
xxx: next n
print : end
rem Jeremy Gardiner, Feb 22 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 28 2001
EXTENSIONS
More terms from David Wasserman, Jul 16 2002
STATUS
approved