allocate mem(2^30)

nb = [0]

{
	f = 0;
	z = 0;
	for (n=1, oo,
		v=if (1+f<=#nb, nb[1+f], 0);
		if (v==0,
			print (z++ " " n);
			if (z==10 000,
				break;
			);
		);
		while (1+v>#nb,
			nb = concat(nb, vector(#nb));
		);
		nb[1+v]++;
		if (v==0,
			f=0,
			f++
		);
	);
}

quit