%I #31 Dec 31 2016 01:24:57
%S 25,289,361,441,529,729,841,961,1089,1521,2401,2601,2809,4761,5041,
%T 5929,6241,7569,8281,9409,20449,21609,22801,24649,25281,26569,29241,
%U 29929,34969,36481,39601,40401,52441,53361,54289,57121,58081,59049,61009,63001,71289
%N Squares that become prime when their most significant (or leftmost) digit is removed.
%C a(1)=25 is the only term in the sequence that ends in 5. Proof: Any number ending in 5 is divisible by 5, and no square ending in 5 can have all 0 internal digits. Let N=A+B where A=N-5 and B=5. Then N^2 = A^2 + 2AB + B^2. B^2 is 25, and because A ends in a zero, A^2 and 2AB ends in two zeros; therefore the sum ends in 25.
%C All other terms end in 1 or 9, because no square ends in 3 or 7.
%C Observation: The sequence often experiences large gaps when the most-significant digit is square. For example, there is a gap of over 10^8 between a(764)=99420841 and a(765)=200307409, and over 10^9 between a(9156)=39980402401 and a(9157)=50000984881.
%C These gaps occur because if n^2 = (10^k*d+r)^2 = 10^(2k)d^2+r*(2*10^k+r) with d=1, 2, or 3 and r small enough so that the first digit of n^2 is d^2, then removing that digit d^2 we are left with r*(2*10^k+r) which is divisible by r and thus cannot be prime if r>1. - _Giovanni Resta_, May 23 2013
%C See A249589 for the square roots. - _M. F. Hasler_, Nov 02 2014
%H Christian N. K. Anderson and Davin Park, <a href="/A225873/b225873.txt">Table of n, a(n) for n = 1..20000</a> [Terms 1 through 10000 were computed by Christian N. K. Anderson and terms 10001 through 20000 were computed by Davin Park]
%e 2401 = 49^2 becomes the prime number 401 when 2 is removed. 5041 = 71^2 becomes the prime number 41 when 5 is removed.
%t b^2 /. Flatten[Outer[Solve[a + #2*10^#1 == b^2 && 0 <= a < 10^#1 && Sqrt[#2*10^#1] <= b < Sqrt[10^(#1 + 1)] && a \[Element] Primes, {a, b}, Integers] &, Range[0, 10], Range[9]], 2] (* _Davin Park_, Dec 30 2016 *)
%o (R)no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s};
%o issquare<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(gmp::factorize(x)))%%2==0));
%o which(sapply(1:200,function(x) isprime(no0(substr(x^2,2,ndig(x^2)))))>0)^2
%o (PARI) is_A225873(n)=isprime(n%10^(#Str(n)-1))&&issquare(n)
%Y Cf. A225885.
%K nonn,base
%O 1,1
%A _Kevin L. Schwartz_ and _Christian N. K. Anderson_, May 19 2013
%E Extended by _Davin Park_, Dec 30 2016