cp's OEIS Frontend

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.

A046732 "Norep emirps": primes with distinct digits which remain prime when reversed.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 71, 73, 79, 97, 107, 149, 157, 167, 179, 347, 359, 389, 701, 709, 739, 743, 751, 761, 769, 907, 937, 941, 953, 967, 971, 983, 1069, 1097, 1237, 1249, 1259, 1279, 1283, 1409, 1429, 1439, 1453, 1487, 1523, 1583, 1597, 1657, 1723, 1753
Offset: 1

Views

Author

Keywords

Comments

There are no 10-digit terms because their sum of digits would be 45 and thus the number would be divisible by 3.
There are 25332 terms in this sequence, the last of which is 987653201, as found by Harvey P. Dale. - see Martin Gardner's column in Scientific American.

Crossrefs

Programs

  • Maple
    read(transforms): A046732 := proc(n) option remember: local d,k,p,distdig: if(n=1)then return 2: fi: p:=procname(n-1): do p:=nextprime(p): if(isprime(digrev(p)))then d:=convert(p,base,10): distdig:=true: for k from 0 to 9 do if(numboccur(d,k)>1)then distdig:=false: break: fi: od: if(distdig)then return p: fi: fi: od: end: seq(A046732(n),n=1..52); # Nathaniel Johnston, May 29 2011
  • Mathematica
    Select[Prime[Range[280]], Length[Union[x = IntegerDigits[#]]] == Length[x] && PrimeQ[FromDigits[Reverse[x]]] &] (* Jayanta Basu, Jun 28 2013 *)
  • Python
    from sympy import prime, isprime
    A046732 = [p for p in (prime(n) for n in range(1,10**3)) if len(str(p)) == len(set(str(p))) and isprime(int(str(p)[::-1]))] # Chai Wah Wu, Aug 14 2014

Extensions

More terms from Jud McCranie.