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”).

A241079
If n is a perfect square, a(n) = 0. If n is not a perfect square, a(n) is the number of final digits necessary to rule out n as a perfect square, or -1 if cannot be ruled out as a perfect square using any group of final digits.
0
0, 1, 1, 0, 2, 2, 1, 1, 0, 2, 2, 1, 1, 2, 2, 0, 1, 1, 2, 2, 3, 1, 1, 4, 0, 2, 1, 1, 3, 2, 2, 1, 1, 2, 2, 0, 1, 1, 2, 2, -1, 1, 1, 4, 2, 2, 1, 1, 0, 2, 2, 1, 1, 2, 2, 4, 1, 1, 2, 2, 3, 1, 1, 0, 2, 2, 1, 1, 3, 2, 2, 1, 1, 2, 2, 4, 1, 1, 2, 2, 0, 1, 1, 5, 2, 2, 1
OFFSET
1,5
COMMENTS
To define the n-digit ending of a number with fewer than n digits, insert 0's in front of it. For example, the 2-digit ending of 5 is 05.
EXAMPLE
a(24) cannot be 3 because 024 is a valid ending of a square (32^2 = 1024).
CROSSREFS
Cf. A241081 (numbers k such that a(k) = -1).
Sequence in context: A269317 A119557 A125919 * A061198 A195011 A290942
KEYWORD
sign,base
AUTHOR
J. Lowell, Apr 15 2014
EXTENSIONS
Terms corrected by and more terms from Jinyuan Wang, Aug 21 2021
STATUS
approved