|
|
A158896
|
|
Primes whose squares are a concatenation of 2 with some prime.
|
|
3
|
|
|
5, 17, 53, 151, 157, 163, 173, 463, 467, 491, 523, 541, 1451, 1471, 1483, 1489, 1499, 1511, 1549, 1553, 1567, 1609, 1657, 1721, 1723, 4583, 4597, 4621, 4649, 4663, 4673, 4703, 4729, 4751, 4759, 4787, 4813, 4937, 4943, 4973, 4993, 5039, 5077, 5227, 5297
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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
|
|
REFERENCES
|
Wladyslaw Narkiewicz, The development of prime number theory. From Euclid to Hardy and Littlewood. Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2000.
I. Niven, H. S. Zuckerman and H. L. Montgomery, An Introduction to the Theory of Numbers (5th ed.). Wiley Text Books, 1991.
Paulo Ribenboim, The New Book of Prime Number Records. Springer, 1996.
|
|
LINKS
|
|
|
EXAMPLE
|
i) The prime 47 has the square 47^2=2209, but 209=11*19 is not prime, so 47 is not in the sequence.
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.
iii) The square of the prime 53 is 2809, i.e., 2 followed by the prime 809, so 53 is in the sequence.
|
|
MAPLE
|
count:= 0: N:= 100: Res:= NULL:
for d from 1 while count < N do
p:= floor(sqrt(2*10^d+10^(d-1)));
while count < N do
p:= nextprime(p);
if p^2 >= 3*10^d then break fi;
q:= p^2 - 2*10^d;
if isprime(q) then
count:= count+1;
Res:= Res, p;
fi
od od:
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(Python)
from sympy import isprime, primerange
def ok(p):
s = str(p*p); return s[0] == '2' and s[1] != '0' and isprime(int(s[1:]))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 29 2009
|
|
EXTENSIONS
|
1451 inserted, and sequence extended beyond 4673, by R. J. Mathar, Apr 01 2009
|
|
STATUS
|
approved
|
|
|
|