login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350698
Consider the positive squares summing to n as obtained by the greedy algorithm; a(n) is the least of these squares.
1
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, 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, 1, 4, 1, 1, 1, 4, 9, 1, 1, 1, 4, 1, 1, 16, 81, 1, 1, 1
OFFSET
1,4
FORMULA
a(n^2) = n^2.
a(n) = A350674(n, A053610(n)).
EXAMPLE
For n = 13:
- 13 = 3^2 + 2^2,
- so a(13) = 2^2.
PROG
(PARI) a(n, e=2) = { my (r=0); while (n, r=sqrtnint(n, e); n-=r^e); r^e }
CROSSREFS
Sequence in context: A364360 A085731 A131301 * A335324 A366245 A083730
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 12 2022
STATUS
approved