This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A349182 #13 Aug 20 2024 18:05:45 %S A349182 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 A349182 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 A349182 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 A349182 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 A349182 Scott R. Shannon, <a href="/A349182/a349182.png">Image for the first 50000 terms</a>. %e A349182 a(1) = 1 as |1 - a(0)| = |1 - 1| = 0, and 0 + 1 = 1 = 1^2 is the next smallest square. %e A349182 a(2) = 3 as |2 - a(1)| = |2 - 1| = 1, and 1 + 3 = 4 = 2^2 is the next smallest square. %e A349182 a(5) = 5 as |5 - a(4)| = |5 - 1| = 4, and 4 + 5 = 9 = 3^2 is the next smallest square. %t A349182 nxt[{n_,a_}]:={n+1,Module[{k=1},While[!IntegerQ[Sqrt[(Abs[n+1-a])+k]],k++];k]}; NestList[ nxt,{0,1},90][[;;,2]] (* _Harvey P. Dale_, Aug 20 2024 *) %Y A349182 Cf. A349119, A000290, A347595, A347594, A009000, A347754. %K A349182 nonn %O A349182 0,3 %A A349182 _Scott R. Shannon_, Nov 09 2021