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.

Showing 1-2 of 2 results.

A347294 Primes that become semiprimes when turned upside down.

Original entry on oeis.org

191, 691, 811, 991, 1009, 1069, 1619, 1801, 1861, 1889, 6089, 6869, 6911, 6961, 8101, 8191, 8609, 8669, 8689, 9001, 9811, 10009, 10099, 10111, 10169, 10181, 10601, 10889, 10891, 11119, 11161, 11689, 11699, 11801, 11969, 11981, 16061, 16691, 16699, 18089, 18119
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 22 2022

Keywords

Examples

			811 is a term because when 811 is turned upside down (rotated 180 degrees) it becomes 118=2*59, a semiprime.
		

Crossrefs

Programs

  • Mathematica
    semiQ[n_] := PrimeOmega[n] == 2; q[n_] := PrimeQ[n] && Module[{d = IntegerDigits[n]}, AllTrue[d, MemberQ[{0, 1, 6, 8, 9}, #] &] && semiQ[FromDigits[Reverse[d] /. {6 -> 9, 9 -> 6}]]]; Select[Range[20000], q] (* Amiram Eldar, Jan 23 2022 *)
  • Python
    from sympy import isprime, factorint
    from itertools import count, islice, product
    def f(s): return s[::-1].translate({ord("6"):ord("9"), ord("9"):ord("6")})
    def agen():
        for digits in count(3):
            for first in "1689":
                for mid in product("01689", repeat=digits-2):
                    for last in "19":
                        s = first + "".join(mid) + last
                        t = int(s)
                        if isprime(t):
                            flip = f(s)
                            if sum(factorint(int(flip)).values()) == 2:
                                yield t
    print(list(islice(agen(), 41))) # Michael S. Branicky, Feb 16 2024

Extensions

More terms from Amiram Eldar, Jan 23 2022

A133030 Divisors of 5130.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 15, 18, 19, 27, 30, 38, 45, 54, 57, 90, 95, 114, 135, 171, 190, 270, 285, 342, 513, 570, 855, 1026, 1710, 2565, 5130
Offset: 1

Views

Author

Omar E. Pol, Oct 27 2007

Keywords

Comments

5130 spells OEIS when turned upside down on a calculator: 57*90 = 5130 ---> OEIS.

Crossrefs

Programs

Showing 1-2 of 2 results.