%I #13 Feb 22 2024 20:21:20
%S 1,2,5,3,7,13,6,11,19,10,21,31,14,26,39,15,29,47,17,33,53,22,37,58,23,
%T 42,65,38,66,30,55,77,34,67,35,61,95,41,70,107,43,82,122,46,87,129,51,
%U 89,133,59,105,57,102,149,62,111,161,69,127,71,123,174,73,130,183,74
%N a(1) = 1; a(n+1) is the least squarefree m not already used such that |m-a(n)| is not equal to |a(k+1)-a(k)| for any k < n.
%H Robert Israel, <a href="/A084334/b084334.txt">Table of n, a(n) for n = 1..10000</a>
%p N:= 1000: # for terms before the first term > N
%p A[1]:= 1:
%p SF:= select(numtheory:-issqrfree, [$2..N]):
%p DA:= {}:
%p y:= 1:
%p found:= true:
%p for n from 2 while found do
%p found:= false;
%p for j from 1 to nops(SF) while not found do
%p x:= SF[j];
%p if not member(abs(x-y),DA) then
%p found:= true;
%p A[n]:= x;
%p DA:= DA union {abs(x-y)};
%p SF:= subsop(j=NULL, SF);
%p y:= x;
%p fi
%p od od:
%p convert(A,list); # _Robert Israel_, Feb 22 2024
%Y Cf. A081145, A084331.
%K nonn,easy
%O 1,2
%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 18 2003
%E Edited and extended by _David Wasserman_, Dec 15 2004