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.
%I A158896 #19 May 18 2021 01:23:21 %S A158896 5,17,53,151,157,163,173,463,467,491,523,541,1451,1471,1483,1489,1499, %T A158896 1511,1549,1553,1567,1609,1657,1721,1723,4583,4597,4621,4649,4663, %U A158896 4673,4703,4729,4751,4759,4787,4813,4937,4943,4973,4993,5039,5077,5227,5297 %N A158896 Primes whose squares are a concatenation of 2 with some prime. %C A158896 Leading zeros of the prime within the concatenation are not admitted. Example: 449^2=201601 is a square of a prime which is 2 concatenated with a zero-padded prime 1601. 449 is not in the sequence. - _R. J. Mathar_, Apr 06 2009 %D A158896 Wladyslaw Narkiewicz, The development of prime number theory. From Euclid to Hardy and Littlewood. Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2000. %D A158896 I. Niven, H. S. Zuckerman and H. L. Montgomery, An Introduction to the Theory of Numbers (5th ed.). Wiley Text Books, 1991. %D A158896 Paulo Ribenboim, The New Book of Prime Number Records. Springer, 1996. %H A158896 Robert Israel, <a href="/A158896/b158896.txt">Table of n, a(n) for n = 1..10000</a> %e A158896 i) The prime 47 has the square 47^2=2209, but 209=11*19 is not prime, so 47 is not in the sequence. %e A158896 ii) If we attach 2 to the prime p=401 we get 2401=49^2, but 49=7^2 is not a prime, so there is no contribution to the sequence. %e A158896 iii) The square of the prime 53 is 2809, i.e., 2 followed by the prime 809, so 53 is in the sequence. %p A158896 count:= 0: N:= 100: Res:= NULL: %p A158896 for d from 1 while count < N do %p A158896 p:= floor(sqrt(2*10^d+10^(d-1))); %p A158896 while count < N do %p A158896 p:= nextprime(p); %p A158896 if p^2 >= 3*10^d then break fi; %p A158896 q:= p^2 - 2*10^d; %p A158896 if isprime(q) then %p A158896 count:= count+1; %p A158896 Res:= Res, p; %p A158896 fi %p A158896 od od: %p A158896 Res; # _Robert Israel_, Mar 06 2018 %t A158896 okQ[n_]:=Module[{idn=IntegerDigits[n^2]},First[idn]==2&& idn[[2]]!=0 && PrimeQ[FromDigits[Rest[idn]]]]; Select[Prime[Range[750]],okQ] (* _Harvey P. Dale_, Jul 22 2011 *) %o A158896 (Python) %o A158896 from sympy import isprime, primerange %o A158896 def ok(p): %o A158896 s = str(p*p); return s[0] == '2' and s[1] != '0' and isprime(int(s[1:])) %o A158896 print(list(filter(ok, primerange(2, 5298)))) # _Michael S. Branicky_, May 17 2021 %Y A158896 Cf. A001248. %K A158896 nonn,base %O A158896 1,1 %A A158896 Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 29 2009 %E A158896 1451 inserted, and sequence extended beyond 4673, by _R. J. Mathar_, Apr 01 2009 %E A158896 Edited by _R. J. Mathar_, Apr 06 2009