A155512
Emirps with digits 0 and 1 only.
Original entry on oeis.org
10011101, 10111001, 100100111, 111001001, 1000110101, 1001001011, 1010001101, 1010011111, 1010110001, 1011000101, 1101001001, 1111100101, 10010100101, 10100000011, 10100000111, 10100101001, 10111001011, 11000000101
Offset: 1
-
emQ[ls_List]:=Module[{rev=Reverse[ls]},Length[ls]==Length[rev]&& ls!=rev && PrimeQ[FromDigits[ls]]&&PrimeQ[FromDigits[rev]]]; Union[Flatten[ Table[FromDigits/@Select[Tuples[{1,0},n],emQ],{n,11}]]] (* Harvey P. Dale, Nov 30 2011 *)
A176371
Primes p such that reversal(p) - 13 is a square.
Original entry on oeis.org
31, 41, 71, 83, 281, 311, 431, 479, 733, 751, 797, 2011, 2857, 3163, 4373, 4397, 4943, 7541, 7577, 7583, 9413, 9491, 20533, 20731, 20771, 24151, 24547, 24767, 26249, 28979, 31121, 41201, 41609, 43321, 43391, 43753, 45641, 49459, 49463, 49811, 49891
Offset: 1
Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 16 2010
41 = prime(13), R(41) - 13 = 14 - 13 = 1^2, is a term.
71 = prime(20), 17 - 13 = 2^2, is a term.
83 = prime(23), 38 - 13 = 5^2, is a term.
797 = prime(139) = palindromic prime(18), N = 28^2, is also a term.
Note successive terms that are also consecutive primes: p(17) = 7577, p(18) = 7583, p(36) = 49459, p(37) = 49463, p(46) = 77849, p(47) = 77863.
- W. W. R. Ball, H. S. M.Coxeter: Mathematical Recreations and Essays, Dover Publications, 13th edition, 1987
- O. Fritsche, R. Mischak and T. Krome: Verflixt und zugeknobelt, Mehr mathematische Raetselgeschichten, Rowohlt TB. Nr.62190, 2007
- C. W. Trigg, Primes with Reverses That Are Powers, J. Rec. Math. 17, 1985
-
isok(n) = {if (! isprime(n), return (0)); d = digits(n); revn = sum(i=1, #d, d[i]*10^(i - 1)); issquare(revn-13);} \\ Michel Marcus, Aug 25 2013
-
from sympy import isprime
A176371_list, i, j = [], 0, 13
while j < 10**10:
p = int(str(j)[::-1])
if j % 10 and isprime(p):
A176371_list.append(p)
j += 2*i+1
i += 1
A176371_list = sorted(A176371_list) # Chai Wah Wu, Dec 17 2015
A210498
Prime numbers that become emirps when their least-significant-digit is deleted.
Original entry on oeis.org
131, 137, 139, 173, 179, 311, 313, 317, 373, 379, 719, 733, 739, 797, 971, 977, 1493, 1499, 1571, 1579, 1993, 1997, 1999, 3119, 3371, 3373, 3593, 7013, 7019, 7331, 7333, 7393, 7433, 7517, 7691, 7699, 9371, 9377, 9413, 9419, 9533, 9539, 9677, 9679, 9719, 9833
Offset: 1
Example: a(1)=131, which becomes 13 upon deletion, which is an emirp.
-
library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x),split=""))),collapse=""))!=x & isprime(j);i=as.bigz(0); y=as.bigz(rep(0,100)); len=0;
while(len<100)
if(isprime((i=nextprime(i))))
if(isemirp(as.bigz(substr(i,1,nchar(as.character(i))-1))))
y[(len=len+1)]=i
A225235
Emirps whose internal digits are also an emirp.
Original entry on oeis.org
1979, 3319, 3371, 3373, 3719, 3733, 7177, 7717, 9133, 9173, 9791, 10177, 10711, 10739, 11071, 11497, 11579, 11677, 13477, 13591, 13597, 17011, 17393, 17519, 19531, 19913, 30139, 30319, 30971, 31139, 31799, 31991, 37619, 39371, 39419, 39839, 70313, 70373, 70717
Offset: 1
7177 and 10177 are in the sequence because both are emirps, and both become the emirp 17 upon deletion of their first and last digits.
-
library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x), split=""))), collapse=""))!=x & isprime(j);
no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s};
i=as.bigz(0); y=as.bigz(rep(0, 100)); len=0;
while(len<100) if(isemirp((i=nextprime(i)))) if(isemirp(as.bigz(no0(substr(i,2,nchar(as.character(i))-1))))) y[(len=len+1)]=i;
as.vector(y)
A346026
Primes that are the first in a run of exactly 6 emirps.
Original entry on oeis.org
10039, 14891, 39791, 119773, 149561, 162293, 163781, 176903, 181751, 197383, 336689, 392911, 393361, 714361, 715361, 779003, 971141, 995443, 996539, 1165037, 1284487, 1307729, 1447151, 1611877, 1640539, 1789621, 1891147, 3136909, 3150557, 3284447, 3339943
Offset: 1
a(1) = 10039 because of the eight consecutive primes 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093 all except 10037 and 10093 are emirps and this is the first such occurrence.
-
EmQ[n_]:=(s=IntegerReverse@n;PrimeQ@s&&n!=s);
Select[Prime@Range[2,50000],Boole[EmQ/@NextPrime[#,Range[-1,6]]]=={0,1,1,1,1,1,1,0}&] (* Giorgos Kalogeropoulos, Jul 27 2021 *)
-
from sympy import isprime, nextprime, prime, primerange
def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
def aupto(limit, runlength=6):
alst = []
pvec = list(primerange(1, prime(runlength+2)+1))
evec = [int(isemirp(p)) for p in pvec]
target = [0] + [1 for i in range(runlength)] + [0]
p = nextprime(pvec[-1])
while pvec[1] <= limit:
if evec == target: alst.append(pvec[1])
pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
strp = str(p)
if strp[0] in "24568": # skip large gaps (p is a prime, not an emirp)
evec = [0 for i in range(runlength+2)]
pvec = [0 for i in range(runlength+2)]
p = nextprime(int(str(int(strp[0])+1)+'0'*(len(strp)-1)))
return alst
print(aupto(3339943)) # Michael S. Branicky, Jul 14 2021
A046485
Sum of first n palindromic primes A002385.
Original entry on oeis.org
2, 5, 10, 17, 28, 129, 260, 411, 592, 783, 1096, 1449, 1822, 2205, 2932, 3689, 4476, 5273, 6192, 7121, 17422, 27923, 38524, 49835, 61246, 73667, 86388, 99209, 112540, 126371, 140302, 154643, 169384, 184835, 200386, 216447, 232808, 249369, 266030, 283501
Offset: 1
-
t = {}; b = 10; Do[p = Prime[n]; i = IntegerDigits[p, b]; If[i == Reverse[i], AppendTo[t, p];(*Print[p.FromDigits[i]]*)], {n, 4000}]; Accumulate[t] (* Vladimir Joseph Stephan Orlovsky, Feb 23 2012 *)
Accumulate[Select[Prime[Range[10000]],IntegerDigits[#]==Reverse[ IntegerDigits[#]]&]] (* Harvey P. Dale, Aug 10 2013 *)
A054218
Palindromic primes of the form 'primemirp' resulting from A054217.
Original entry on oeis.org
2, 3, 5, 7, 131, 313, 373, 797, 11311, 17971, 18181, 19991, 35353, 72727, 78787, 90709, 93739, 96769, 98389, 1153511, 1193911, 1201021, 1409041, 1583851, 1597951, 1657561, 1831381, 1879781, 3083803, 3089803, 3319133, 3343433, 3391933, 3541453, 3643463
Offset: 1
Prime 113 has emirp 311 and 11311 is a palindromic prime.
-
from sympy import isprime
for i in range(2,10**7):
if isprime(i):
emirp = int(str(i)[-1::-1])
if isprime(emirp):
primemirp = int(str(i)+str(emirp)[1:])
if isprime(primemirp):
print(primemirp)
# Peter Rowlett, Nov 16 2023
A085300
a(n) is the least prime x such that when reversed it is a power of prime(n).
Original entry on oeis.org
2, 3, 5, 7, 11, 31, 71, 163, 18258901387, 90367894271, 13, 73, 1861, 344800741, 34351783286302805384336021, 940315563074788471, 1886172359328147919771, 14854831
Offset: 1
a(14)=344800741 means that 147008443=43^5=p(14)^5, where 5 is the smallest such exponent;
a(19) has 82 decimal digits and if reversed equals 39th power of p(19)=67.
A155507
Emirps with digits 1 and 9 only.
Original entry on oeis.org
199, 991, 91199, 99119, 111119, 111919, 119191, 191911, 911111, 919111, 991999, 999199, 1191119, 1191191, 1191991, 1911911, 1991911, 9111911, 11111911, 11191991, 11911111, 11919991, 19111991, 19911191, 19919111, 19991911
Offset: 1
-
emrpQ[n_]:=Module[{r=IntegerReverse[n]},r!=n&&AllTrue[{r,n},PrimeQ]]; Table[Select[FromDigits/@Tuples[{1,9},n],emrpQ],{n,8}]//Flatten (* Harvey P. Dale, Aug 09 2017 *)
A155508
Lesser of emirps (pairs) with digits 1 and 9 only.
Original entry on oeis.org
199, 91199, 111119, 111919, 119191, 991999, 1191119, 1191191, 1191991, 11111911, 11191991, 11919991, 19111991, 91111199, 111111199, 111199199, 191111119, 199991999, 919919999, 1111111999, 1191111991, 1199111191, 1911199999
Offset: 1
-
Flatten[Table[Select[Subsets[Select[FromDigits/@Tuples[{1,9},n],PrimeQ],{2}],AllTrue[#,PrimeQ]&[[1]]==IntegerReverse[#[[2]]]&][[All,1]],{n,3,10}]/.{}->Nothing] (* Harvey P. Dale, Aug 21 2020 *)
Comments