cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A225873 Squares that become prime when their most significant (or leftmost) digit is removed.

This page as a plain text file.
%I A225873 #31 Dec 31 2016 01:24:57
%S A225873 25,289,361,441,529,729,841,961,1089,1521,2401,2601,2809,4761,5041,
%T A225873 5929,6241,7569,8281,9409,20449,21609,22801,24649,25281,26569,29241,
%U A225873 29929,34969,36481,39601,40401,52441,53361,54289,57121,58081,59049,61009,63001,71289
%N A225873 Squares that become prime when their most significant (or leftmost) digit is removed.
%C A225873 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 A225873 All other terms end in 1 or 9, because no square ends in 3 or 7.
%C A225873 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 A225873 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 A225873 See A249589 for the square roots. - _M. F. Hasler_, Nov 02 2014
%H A225873 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 A225873 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 A225873 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 A225873 (R)no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s};
%o A225873 issquare<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(gmp::factorize(x)))%%2==0));
%o A225873 which(sapply(1:200,function(x) isprime(no0(substr(x^2,2,ndig(x^2)))))>0)^2
%o A225873 (PARI) is_A225873(n)=isprime(n%10^(#Str(n)-1))&&issquare(n)
%Y A225873 Cf. A225885.
%K A225873 nonn,base
%O A225873 1,1
%A A225873 _Kevin L. Schwartz_ and _Christian N. K. Anderson_, May 19 2013
%E A225873 Extended by _Davin Park_, Dec 30 2016