Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #20 Aug 21 2021 15:52:48
%S 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,
%T 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,
%U 3,2,2,1,1,2,2,4,1,1,2,2,0,1,1,5,2,2,1
%N 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.
%C 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.
%e a(24) cannot be 3 because 024 is a valid ending of a square (32^2 = 1024).
%Y Cf. A241081 (numbers k such that a(k) = -1).
%K sign,base
%O 1,5
%A _J. Lowell_, Apr 15 2014
%E Terms corrected by and more terms from _Jinyuan Wang_, Aug 21 2021