%I #9 Nov 09 2021 05:53:40
%S 1,1,3,1,1,5,3,5,1,1,7,5,2,5,7,1,1,9,7,4,9,4,7,9,1,1,11,9,6,2,8,2,6,9,
%T 11,1,1,13,11,8,4,12,6,12,4,8,11,13,1,1,15,13,10,6,1,10,3,10,1,6,10,
%U 13,15,1,1,17,15,12,8,3,14,7,16,7,14,3,8,12,15,17,1,1,19,17,14,10,5,18,11
%N a(0) = 1; for n>0, a(n) is the smallest positive integer such that |n - a(n-1)| + a(n) is a square.
%H Scott R. Shannon, <a href="/A349182/a349182.png">Image for the first 50000 terms</a>.
%e a(1) = 1 as |1 - a(0)| = |1 - 1| = 0, and 0 + 1 = 1 = 1^2 is the next smallest square.
%e a(2) = 3 as |2 - a(1)| = |2 - 1| = 1, and 1 + 3 = 4 = 2^2 is the next smallest square.
%e a(5) = 5 as |5 - a(4)| = |5 - 1| = 4, and 4 + 5 = 9 = 3^2 is the next smallest square.
%Y Cf. A349119, A000290, A347595, A347594, A009000, A347754.
%K nonn
%O 0,3
%A _Scott R. Shannon_, Nov 09 2021
|