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 A350698 #6 Jan 24 2022 16:12:46 %S A350698 1,1,1,4,1,1,1,4,9,1,1,1,4,1,1,16,1,1,1,4,1,1,1,4,25,1,1,1,4,1,1,1,4, %T A350698 9,1,36,1,1,1,4,1,1,1,4,9,1,1,1,49,1,1,1,4,1,1,1,4,9,1,1,1,4,1,64,1,1, %U A350698 1,4,1,1,1,4,9,1,1,1,4,1,1,16,81,1,1,1 %N A350698 Consider the positive squares summing to n as obtained by the greedy algorithm; a(n) is the least of these squares. %F A350698 a(n^2) = n^2. %F A350698 a(n) = A350674(n, A053610(n)). %e A350698 For n = 13: %e A350698 - 13 = 3^2 + 2^2, %e A350698 - so a(13) = 2^2. %o A350698 (PARI) a(n, e=2) = { my (r=0); while (n, r=sqrtnint(n, e); n-=r^e); r^e } %Y A350698 Cf. A053610, A350674. %K A350698 nonn %O A350698 1,4 %A A350698 _Rémy Sigrist_, Jan 12 2022