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.

A264815 Semirps: a semirp (or semi-r-p) is a semiprime r*p with r and p both reversed primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 39, 49, 51, 55, 62, 65, 74, 77, 85, 91, 93, 111, 119, 121, 142, 143, 146, 155, 158, 169, 185, 187, 194, 202, 213, 214, 217, 219, 221, 226, 237, 259, 262, 289, 291, 298, 302, 303, 314, 321, 334, 339, 341, 355
Offset: 1

Views

Author

Danny Rorabaugh, Nov 25 2015

Keywords

Comments

A semiprime (A001358) is the product of two prime, not necessarily distinct. A semiprime is in this list if those two primes (A000040) are reversed primes (A004087).
Since A007500 is the intersection of A000040 and A004087, this sequence is also the sorted list of all r*p with r and p in A007500.

Examples

			9 is in the list because 9 = 3*3 is a semiprime and reverse(3) = 3 is prime.
143 is in the list because 143 = 11*13 is a semiprime and both reverse(11) = 11 and reverse(13) = 31 are prime.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=250},Take[Union[Times@@@Select[Tuples[IntegerReverse/@Prime[Range[nn]],2],AllTrue[#,PrimeQ]&]],60]] (* Harvey P. Dale, Apr 27 2025 *)
  • Sage
    reverse = lambda n: sum([10^i*int(str(n)[i]) for i in range(len(str(n)))])
    def is_semirp(n):
      F = factor(n)
      if sum([f[1] for f in F])==2:
        r, p = F[0][0], F[-1][0]
        if is_prime(reverse(r)) and is_prime(reverse(p)): return True
    [a for a in range(1,356) if is_semirp(a)] # Danny Rorabaugh, Nov 25 2015

Formula

[A007500]^2, sorted.