login
A385236
Largest x such that x^2+y^2 = A001481(n), x and y are nonnegative integers.
5
0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, 4, 5, 5, 5, 4, 5, 6, 6, 6, 5, 6, 7, 7, 6, 7, 7, 6, 8, 8, 8, 6, 8, 7, 8, 9, 9, 9, 8, 9, 9, 7, 10, 10, 10, 9, 10, 8, 10, 9, 11, 11, 11, 8, 11, 10, 11, 12, 12, 11, 12, 10, 12, 11, 12, 9, 10, 13, 13, 13, 13, 12, 10, 13, 12, 13, 14, 14, 14, 11, 14, 12, 14, 13, 14, 15
OFFSET
1,4
COMMENTS
A229140(n) gives smallest x such that x^2+y^2 = A001481(n), x and y are nonnegative integers.
FORMULA
a(n) = sqrt(A001481(n)) if A001481(n) is square.
a(n) = sqrt(A001481(n)-A229140(n)^2).
a(n) = A328803(n) - A229140(n).
a(n) = A064876(A001481(n)).
EXAMPLE
For n=9, A001481(9)=13=2^2+3^2, so A229140(9)=2 and a(9)=3.
For n=14, A001481(14)=25=3^2+4^2=0^2+5^2, so A229140(14)=0 and a(14)=5.
PROG
(PARI) for(n=0, 300, my(s=sqrtint(n)); forstep(i=s, 0, -1, if(issquare(n-i*i), print1(i, ", "); break)))
CROSSREFS
KEYWORD
nonn,easy,look
AUTHOR
Zhuorui He, Jul 08 2025
STATUS
approved