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.

A080789 Numbers that are primes when turned upside down.

Original entry on oeis.org

11, 19, 61, 68, 101, 109, 110, 116, 118, 161, 166, 169, 181, 188, 190, 199, 601, 608, 610, 616, 619, 661, 680, 1006, 1010, 1018, 1019, 1061, 1066, 1081, 1090, 1091, 1096, 1100, 1106, 1108, 1109, 1118, 1160, 1169, 1180, 1181, 1186, 1601, 1606, 1609, 1610, 1618
Offset: 1

Views

Author

P. Giannopoulos (pgiannop1(AT)yahoo.com), Mar 12 2003

Keywords

References

  • P. Giannopoulos, The Brainteasers (unpublished)

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import product
    def ud(s):
        return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})
    def auptod(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            for start in "16":
                for p in product("01689", repeat=d-1):
                    s = start + "".join(p)
                    t, udt = int(s), int(ud(s))
                    if isprime(udt): alst.append(t)
        return alst
    print(auptod(4)) # Michael S. Branicky, Nov 19 2021

Extensions

610 inserted and a(24) and beyond from Michael S. Branicky, Nov 19 2021