%I #18 Apr 04 2021 01:09:35
%S 1,1,5,7,4,6,3,5,2,4,1,3,9,2,8,1,7,11,6,10,5,9,4,8,3,7,2,6,1,5,13,4,
%T 12,3,11,2,10,1,9,15,8,14,7,13,6,12,5,11,4,10,3,9,2,8,1,7,17,6,16,5,
%U 15,4,14,3,13,2,12,1,11
%N a(1) = 1, for n > 1, a(n) is the smallest positive integer for which a(n-1) + n + a(n) is a square.
%H Todor Szimeonov, <a href="https://newprimax.blogspot.com/2021/04/a-completive-sequence.html">A completive sequence</a>.
%t d[n_] := Floor[Sqrt[n] + 1]^2 - n; a[1] = 1; a[n_] := a[n] = d[a[n - 1] + n]; Array[a, 100] (* _Amiram Eldar_, Apr 03 2021 *)
%o (Python)
%o from math import isqrt
%o def aupton(terms):
%o alst = [1]
%o for n in range(2, terms+1):
%o alst.append((isqrt(alst[-1] + n)+1)**2 - alst[-1] - n)
%o return alst
%o print(aupton(79)) # _Michael S. Branicky_, Apr 03 2021
%K nonn
%O 1,3
%A _Todor Szimeonov_, Apr 03 2021