{
	a = vector(10 000);
	m = 1;
	r = 1;

	for (n=1, #a,
		if (n==1,
			a[n] = 1,
			a[n] = sum(k=1, n-1, gcd(m, a[k])==1);
			if (a[n]==a[n-1],
				r++,
				r = 1
			);
		);

		m = max(m,r);

		print (n " " a[n]);
	);
}

quit