%C a(1) = 1; for n > 1, a(n) is the smallest unused positive integer such that |a(n) - a(n-1)| is a triangular number (A000217) that has not already been used as the absolute difference between two successive terms.

%o a:=[1]; TUsed:=[]; for n in [2..57] do tBest:=0; k:=0; while true do k+:=1; T:=(k*(k+1)) div 2; if not (T in TUsed) then t:=a[n-1]-T; if t lt 1 then break; end if; if not (t in a) then tBest:=t; end if; end if; end while; if tBest eq 0 then k:=0; while true do k+:=1; T:=(k*(k+1)) div 2; if not (T in TUsed) then t:=a[n-1]+T; if not (t in a) then tBest:=t; break; end if; end if; end while; end if; a[n]:=tBest; TUsed[#TUsed+1]:=Abs(a[n]-a[n-1]); end for; a;