login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228768 Smallest number that is an emirp in all bases from 2 through n. 2
11, 11, 53, 61, 193, 193, 193, 193, 93836531, 1963209431, 14322793967831, 14322793967831 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

Note: This sequence would differ almost certainly only in a few smaller terms if (multi-digit) palindromes were also allowed or, in the other direction, if the emirp partners were required to all differ from each other.

Numbers in this sequence must lie in specific ranges wherein the leading digit in each composite base is relatively prime to the base. In particular, if a value is to be found that is emirp in bases 2 through 14, its leading digits in bases 4, 6, 8, 9, 10, 12 and 14 are limited to 2/3, 2/5, 4/7, 6/8 (=3/4), 4/9, 4/11 and 6/13 of the possibilities.

With searches limited to such ranges, a probability estimate -- based on the Prime Number Theorem -- that a prime number is an emirp is enhanced by a factor expressing knowledge of non-divisibility by the prime divisors of the base and also by the prime factors of the base minus and plus 1. For example, for base 10 the knowledge that a number's reversal is prime and leads with a permissible digit implies that the number itself is not divisible by 2, 3, 5 or 11; and a factor of 2*(3/2)*(5/4)*(11/10)=33/8 would properly be multiplied by the reciprocal of the logarithm of the number to approximate the chance that the number is prime.

For the base-14 problem, employing a small (number-dependent) constant c to account for ratios of a number to its different-base reversals and multiplying such factors together provides an overall estimate of (3^5 * 5^4 * 7^5 * 11^3 * 13^3)/(2^28*(log(P)+c)^13) that a large prime, P, with permissible leading digits is an emirp in bases 2 through 14. The rational multiplier is about 27806397.37 or 3.7378900 per base. With calculations based on this way of employing standard heuristics, it turns out that this next term is most likely in the 3rd permissible range, between 5*6^20 and 2*10^16. (The 1st and 2nd are (a(13), 6*9^13) and (3*8^15, 2*14^12), respectively.) But there is an appreciable chance of its arising before that (greater than 10%), and also a not ignorable possibility (3 to 4%) it cannot be found until the 4th range (between 9*14^15 and 8*12^16, the chances being microscopic of this failing). Thus, either luck or excessive use of resources is required.

LINKS

Table of n, a(n) for n=2..13.

Wikipedia, Emirp

EXAMPLE

Decimal 193 is 11000001, 21011, 3001, 1233, 521, 364, 301 and 234 in bases 2 through 9, and reversing (and translating back to decimal from these bases) gives primes 131, 113, 67, 461, 53, 241, 67 and 353.

PROG

(PARI) emirp(p, b)=my(q, t=p); while(t, q=b*q+t%b; t\=b); isprime(q) && p!=q

a(n)=forprime(p=2, , for(b=2, n, if(!emirp(p, b), next(2))); return(p)) \\ Charles R Greathouse IV, Sep 03 2013

(Python)

from gmpy2 import is_prime, next_prime

def isemirp(n, b=10): # check if n is emirp in base b

....x, y = n, 0

....while x >= b:

........x, r = divmod(x, b)

........y = y*b + r

....y = y*b + x

....return n != y and is_prime(y)

def A228768(n):

....m = 1

....while True:

........m = next_prime(m)

........for b in range(2, n+1):

............if not isemirp(m, b):

................break

........else:

............return m # Chai Wah Wu, Jun 11 2015

CROSSREFS

Cf. A006567, A080790, A136634.

Sequence in context: A089766 A077699 A266705 * A003876 A014461 A111221

Adjacent sequences:  A228765 A228766 A228767 * A228769 A228770 A228771

KEYWORD

nonn,base,more

AUTHOR

James G. Merickel, Sep 03 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 26 10:36 EST 2021. Contains 341631 sequences. (Running on oeis4.)