# [seqfan] Re: "What primes P have P^P containing the string 'P' as substring'?"

Harvey P. Dale hpd1 at nyu.edu
Mon Apr 26 23:06:00 CEST 2010

```Jonathan:

Here are the first terms of the sequence: 5, 11, 17, 19, 31, 37,
41, 43, 53, 59, 61, 71, 73, 79, 83, 97, 101, 103, 127, 131, 151, 173,
191, 193, 227, 233, 251, 263, 269, 271, 293, 313, 337, 347, 349, 353,
359, 367, 373, 379, 383, 389, 401, 419, 421, 431, 433, 439, 443, 461,
467, 487, 491, 499, 503, 521, 523, 541, 547, 557, 563, 569, 571, 577,
587, 599, 601, 607, 613, 617, 619, 643, 647, 653, 659, 673, 677, 683,
701, 709, 719, 727, 733, 751, 757, 761, 769, 773, 787, 797, 809, 811,
823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 887, 907, 911, 919,
929, 937, 941, 947, 953, 967, 971, 983, 991, 997, 1049, 1063, 1093,
1097, 1109, 1123, 1151, 1171, 1181, 1201, 1213, 1237, 1249, 1301, 1361,
1381, 1399, 1409, 1423, 1427, 1439, 1447, 1471, 1481, 1487, 1489, 1493,
1523, 1531, 1553, 1559, 1567, 1571.

Here is a Mathematica program for generating the terms:

okQ[n_]:=Module[{len=IntegerLength[n],idn,idnpwr},idn=IntegerDigits[n];i
dnpwr=IntegerDigits[n^n];Length[Flatten[Select[Partition[idnpwr,len,1],#
==idn&]]]>=len]
Select[Prime[Range[250]], okQ]

Please feel free to submit the sequence.

Best,

Harvey P. Dale

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu
[mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Jonathan Post
Sent: Monday, April 26, 2010 4:07 PM
To: JM Bergot; Sequence Fanatics Discussion list
Subject: [seqfan] "What primes P have P^P containing the string 'P' as
substring'?"

JM Bergot asked me in an email: "What primes P have P^P containing the
string 'P' as substring'?"

5^5 = 3125 has "5" as substring.

11^11 = 285311670611 has two substrings of "11"

17^17 = 827240261886336764177  has "17" as 3rd and 2nd digit from
right-hand.

19^19 = 1978419655660313589123979 has a "19" as its left end, and
another later.

31^31 = 17069174130723235958610643029059314756044734431

has a "31" at right-hand end, and a second to the left a ways.

A051674 (n-th prime)^(n-th prime).

Is there a sequence in there, base and prime related, struggling to be
interesting to anyone on seqfans?

Eventually, all P^P are pandigital.  But not "normal." Right?

Best,

Jonathan Vos Post

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

```