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-5 of 5 results.

A000787 Strobogrammatic numbers: the same upside down.

Original entry on oeis.org

0, 1, 8, 11, 69, 88, 96, 101, 111, 181, 609, 619, 689, 808, 818, 888, 906, 916, 986, 1001, 1111, 1691, 1881, 1961, 6009, 6119, 6699, 6889, 6969, 8008, 8118, 8698, 8888, 8968, 9006, 9116, 9696, 9886, 9966, 10001, 10101, 10801, 11011, 11111, 11811, 16091, 16191
Offset: 1

Views

Author

Keywords

Comments

Strobogrammatic numbers are a kind of ambigrams that retain the same meaning when viewed upside down. - Daniel Mondot, Sep 27 2016
"Upside down" here means rotated by 180 degrees (i.e., central symmetry), NOT "vertically flipped" (symmetry w.r.t. horizontal line, which are in A045574). - M. F. Hasler, May 04 2012

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007597 (Primes in this sequence), A057770, A111065, A169731 (another version).
Subsequence of A045574. - M. F. Hasler, May 04 2012

Programs

  • Mathematica
    fQ[n_] := Block[{s = {0, 1, 6, 8, 9}, id = IntegerDigits[n]}, If[ Union[ Join[s, id]] == s && (id /. {6 -> 9, 9 -> 6}) == Reverse[id], True, False]]; Select[ Range[0, 16190], fQ[ # ] &] (* Robert G. Wilson v, Oct 11 2005 *)
  • Python
    from itertools import count, islice, product
    def ud(s): return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})
    def agen():
        yield from [0, 1, 8]
        for d in count(2):
            for start in "1689":
                for rest in product("01689", repeat=d//2-1):
                    left = start + "".join(rest)
                    right = ud(left)
                    for mid in [[""], ["0", "1", "8"]][d%2]:
                        yield int(left + mid + right)
    print(list(islice(agen(), 47))) # Michael S. Branicky, Mar 29 2022

Extensions

More terms from Robert G. Wilson v, Oct 11 2005

A045574 Numbers that are still numbers when turned upside down (uses only digits 0, 1, 6, 8, 9 with no final 0's).

Original entry on oeis.org

0, 1, 6, 8, 9, 11, 16, 18, 19, 61, 66, 68, 69, 81, 86, 88, 89, 91, 96, 98, 99, 101, 106, 108, 109, 111, 116, 118, 119, 161, 166, 168, 169, 181, 186, 188, 189, 191, 196, 198, 199, 601, 606, 608, 609, 611, 616, 618, 619, 661, 666, 668, 669, 681, 686, 688, 689, 691, 696, 698, 699
Offset: 1

Views

Author

Keywords

Comments

"No final 0's" means that the rotated number should not have leading zeros; the single digit of the number 0 itself is not considered as such.

Crossrefs

Programs

  • PARI
    is_A045574(n)=n%10 & !setminus(Set(Vec(Str(n))),Vec("01689")) || !n  \\ M. F. Hasler, May 04 2012

Extensions

More terms from Michel Marcus, Dec 27 2020

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

A080788 Primes that are still primes when turned upsided down.

Original entry on oeis.org

11, 19, 61, 101, 109, 181, 199, 601, 619, 661, 1019, 1061, 1091, 1109, 1181, 1601, 1609, 1669, 1699, 1811, 1901, 1999, 6011, 6091, 6101, 6199, 6619, 6661, 6689, 6691, 6899, 6991, 10061, 10069, 10091, 10691, 10861, 10909, 11069, 11681, 11909, 16001, 16091
Offset: 1

Views

Author

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

Keywords

References

  • P. Giannopoulos, The Brainteasers, unpublished.

Crossrefs

Programs

  • Haskell
    import Data.List (unfoldr)
    a048890 n = a048890_list !! (n-1)
    a048890_list = filter f a000040_list where
       f x = all (`elem` [0,1,6,8,9]) ds && x' /= x && a010051 x' == 1
         where x' = foldl c 0 ds
               c v 6 = 10*v + 9; c v 9 = 10*v + 6; c v d = 10*v + d
               ds = unfoldr d x
               d z = if z == 0 then Nothing else Just $ swap $ divMod z 10
    -- Reinhard Zumkeller, Nov 18 2011
    
  • 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 p in product("01689", repeat=d-1):
                if d > 1 and p[0] == "0": continue
                for end in "19":
                    s = "".join(p) + end
                    t, udt = int(s), int(ud(s))
                    if isprime(t) and isprime(udt): alst.append(t)
        return alst
    print(auptod(5)) # Michael S. Branicky, Nov 19 2021

Extensions

Missing 1669 and 6689 inserted by Reinhard Zumkeller, Nov 18 2011

A145750 Primes which become emirps when rotated by 180 degrees on a digital clock display.

Original entry on oeis.org

661, 1061, 1091, 1181, 1601, 1811, 1901, 6011, 6991, 10061, 10091, 10861, 11681, 16001, 16981, 19001, 19961, 60601, 60611, 69001, 106861, 108161, 108881, 109891, 110881, 116881, 116911, 118081, 118861, 119101, 119611, 160861, 161611, 168601, 169691
Offset: 1

Views

Author

Lekraj Beedassy, Apr 04 2009

Keywords

Comments

The sequence contains all bemirps A048895.
Subsequence of A057770. [R. J. Mathar, Apr 05 2009]

Examples

			1109 is a prime. After 2D rotation it is 6011, which is prime. However, 6011 is not an emirp because 1106 is not prime. So 1109 is not in the sequence.
		

Extensions

1109 removed, 6011 inserted etc. by R. J. Mathar, Apr 05 2009
Showing 1-5 of 5 results.