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 A228768 #60 May 22 2025 10:21:36 %S A228768 11,11,53,61,193,193,193,193,93836531,1963209431,14322793967831, %T A228768 14322793967831 %N A228768 Smallest number that is an emirp in all bases from 2 through n. %C A228768 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. %C A228768 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. %C A228768 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. %C A228768 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. %H A228768 Wikipedia, <a href="http://en.wikipedia.org/wiki/Emirp">Emirp</a> %e A228768 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. %o A228768 (PARI) emirp(p,b)=my(q,t=p);while(t,q=b*q+t%b;t\=b);isprime(q) && p!=q %o A228768 a(n)=forprime(p=2,,for(b=2,n,if(!emirp(p,b),next(2))); return(p)) \\ _Charles R Greathouse IV_, Sep 03 2013 %o A228768 (Python) %o A228768 from gmpy2 import is_prime, next_prime %o A228768 def isemirp(n,b=10): # check if n is emirp in base b %o A228768 x, y = n, 0 %o A228768 while x >= b: %o A228768 x, r = divmod(x,b) %o A228768 y = y*b + r %o A228768 y = y*b + x %o A228768 return n != y and is_prime(y) %o A228768 def A228768(n): %o A228768 m = 1 %o A228768 while True: %o A228768 m = next_prime(m) %o A228768 for b in range(2,n+1): %o A228768 if not isemirp(m,b): %o A228768 break %o A228768 else: %o A228768 return m # _Chai Wah Wu_, Jun 11 2015 %Y A228768 Cf. A006567, A080790, A136634. %K A228768 nonn,base,more %O A228768 2,1 %A A228768 _James G. Merickel_, Sep 03 2013