A225873 Squares that become prime when their most significant (or leftmost) digit is removed.
25, 289, 361, 441, 529, 729, 841, 961, 1089, 1521, 2401, 2601, 2809, 4761, 5041, 5929, 6241, 7569, 8281, 9409, 20449, 21609, 22801, 24649, 25281, 26569, 29241, 29929, 34969, 36481, 39601, 40401, 52441, 53361, 54289, 57121, 58081, 59049, 61009, 63001, 71289
Offset: 1
Examples
2401 = 49^2 becomes the prime number 401 when 2 is removed. 5041 = 71^2 becomes the prime number 41 when 5 is removed.
Links
- Christian N. K. Anderson and Davin Park, Table of n, a(n) for n = 1..20000 [Terms 1 through 10000 were computed by Christian N. K. Anderson and terms 10001 through 20000 were computed by Davin Park]
Crossrefs
Cf. A225885.
Programs
-
Mathematica
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 *)
-
PARI
is_A225873(n)=isprime(n%10^(#Str(n)-1))&&issquare(n)
-
R
no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}; issquare<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(gmp::factorize(x)))%%2==0)); which(sapply(1:200,function(x) isprime(no0(substr(x^2,2,ndig(x^2)))))>0)^2
Extensions
Extended by Davin Park, Dec 30 2016
Comments