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-10 of 23 results. Next

A274831 Strobogrammatic (A000787) composite numbers whose prime factors are strobogrammatic as well.

Original entry on oeis.org

1111, 11088011, 16169191, 101808101, 616101919, 668808899, 686808989, 1016969101, 1106699011, 1199006611, 6068888909, 6699116699, 6699886699, 11990006611, 16168089191, 19190006161, 19198086161, 66110001199, 66880008899, 110668899011, 161600009191
Offset: 1

Views

Author

Keywords

Comments

The smallest term which is the product of 3 primes is 1111008888001111 = 11 * 101 * 1000008000001. The smallest term which is not a multiple of 11 or 101 is a(790) = 100111801888108111001 = 100111001 * 1000008000001.

Examples

			16169191 is a term because it is equal to 101 * 160091.
		

Crossrefs

A105268 Primes which are 1 + strobogrammatic numbers A000787(n): the same upside down.

Original entry on oeis.org

2, 89, 97, 809, 907, 8009, 8699, 9697, 9887, 81119, 98887, 8000009, 9888887, 81111119, 8111111119, 8666699999, 9888888887, 8000000000009, 9888888888887, 98888888888888887, 81111111111111111119, 800000000000000000009
Offset: 1

Views

Author

Jonathan Vos Post, Apr 16 2005

Keywords

Comments

Primes which, upon subtracting one, give numbers which read the same upside-down. Not to be confused with strobogrammatic primes A007597 such as 181 or 619. Also, 263 is the largest known prime whose square is strobogrammatic. Not to be confused with strobogrammatic squares A018848 such as 109181601. After a(7) this sequence is exemplary, not complete (i.e. missing some values).

Examples

			9887 is prime, 9887 = 9886+1 and 9886 turned upside-down is 9886 again.
		

Crossrefs

Formula

{A000787(n)+1} intersect {A000040}.

Extensions

Term a(17) reordered by Georg Fischer, Mar 20 2022

A259984 a(n) = A000787(n) + 1.

Original entry on oeis.org

1, 2, 9, 12, 70, 89, 97, 102, 112, 182, 610, 620, 690, 809, 819, 889, 907, 917, 987, 1002, 1112, 1692, 1882, 1962, 6010, 6120, 6700, 6890, 6970, 8009, 8119, 8699, 8889, 8969, 9007, 9117, 9697, 9887, 9967, 10002, 10102, 10802, 11012, 11112, 11812, 16092
Offset: 1

Views

Author

N. J. A. Sloane, Jul 13 2015

Keywords

Crossrefs

Cf. A000787.

A007597 Strobogrammatic primes.

Original entry on oeis.org

11, 101, 181, 619, 16091, 18181, 19861, 61819, 116911, 119611, 160091, 169691, 191161, 196961, 686989, 688889, 1008001, 1068901, 1160911, 1180811, 1190611, 1191611, 1681891, 1690691, 1880881, 1881881, 1898681, 1908061, 1960961, 1990661, 6081809, 6100019, 6108019
Offset: 1

Views

Author

Keywords

Comments

Primes which are invariant under a 180-degree rotation.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • C. W. Trigg, "Strobogrammatic Primes and Prime Rotative Twins", J. Rec. Math., 15 (1983), 281-282.

Crossrefs

Cf. A000787.

Programs

  • Mathematica
    lst = {}; fQ[n_] := Block[{allset = {0, 1, 6, 8, 9}, id = IntegerDigits@n}, Union@ Join[id, allset] == allset && Reverse[id /. {6 -> 9, 9 -> 6}] == id]; Do[ If[ PrimeQ@n && fQ@n, AppendTo[lst, n]], {n, 2000000}]; lst (* Robert G. Wilson v, Feb 27 2007 *)
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def ud(s): return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})
    def agen():
        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]:
                        t = int(left + mid + right)
                        if isprime(t):
                            yield t
    print(list(islice(agen(), 33))) # Michael S. Branicky, Mar 29 2022

Extensions

More terms from David W. Wilson
a(31)-a(33) from K. D. Bajpai, Jun 23 2017

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

A053701 Vertically symmetric numbers.

Original entry on oeis.org

0, 1, 8, 11, 25, 52, 88, 101, 111, 181, 205, 215, 285, 502, 512, 582, 808, 818, 888, 1001, 1111, 1251, 1521, 1881, 2005, 2115, 2255, 2525, 2885, 5002, 5112, 5252, 5522, 5882, 8008, 8118, 8258, 8528, 8888, 10001, 10101, 10801, 11011, 11111, 11811
Offset: 1

Views

Author

Henry Bottomley, Feb 14 2000

Keywords

Comments

Numbers that are symmetric about a vertical mirror.
2 and 5 are taken as mirror images (as on calculator displays).

Crossrefs

Cf. A000787, A007284, A018846 (strobogrammatic numbers).

Programs

  • Maple
    compdig := proc(n) if(n=2)then return 5: elif(n=5)then return 2: elif(n=0 or n=1 or n=8)then return n: else return -1: fi: end: isA053701 := proc(n) local d,l,j: d:=convert(n,base,10): l:=nops(d): for j from 1 to ceil(l/2) do if(not d[j]=compdig(d[l-j+1]))then return false: fi: od: return true: end: for n from 0 to 10000 do if(isA053701(n))then printf("%d, ",n): fi: od: # Nathaniel Johnston, May 17 2011
  • Python
    from itertools import count, islice, product
    def lr(s): return s[::-1].translate({ord('2'):ord('5'), ord('5'):ord('2')})
    def A053701gen(): # generator of terms
        yield from [0, 1, 8]
        for d in count(2):
            for first in "1258":
                for rest in product("01258", repeat=d//2-1):
                    left = first + "".join(rest)
                    for mid in [[""], ["0", "1", "8"]][d%2]:
                        yield int(left + mid + lr(left))
    print(list(islice(A053701gen(), 45))) # Michael S. Branicky, Jul 09 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 01 2001

A006072 Numbers with mirror symmetry about middle.

Original entry on oeis.org

0, 1, 8, 11, 88, 101, 111, 181, 808, 818, 888, 1001, 1111, 1881, 8008, 8118, 8888, 10001, 10101, 10801, 11011, 11111, 11811, 18081, 18181, 18881, 80008, 80108, 80808, 81018, 81118, 81818, 88088, 88188, 88888, 100001, 101101, 108801, 110011, 111111, 118811, 180081
Offset: 1

Views

Author

Keywords

Comments

Apparently this sequence and A111065 have the same parity. - Jeremy Gardiner, Oct 15 2005
Obviously, terms of this sequence also have the same parity (and also the same digital sum mod 6) as those of A118594, see below. - M. F. Hasler, May 08 2013
The number of n-digit terms is given by A225367 -- which counts palindromes in base 3, A118594. The terms here are the base 3 palindromes considered there, with 2 replaced by 8 (which means this sequence A006072 arises from A118594 not only by taking the 3rd power of each digit, but also by superposing the number with its horizontal or vertical reflection, somehow remarkably given the symmetry of numbers considered here). - M. F. Hasler, May 05 2013 [Part of the comment moved from A225367 to here on May 08 2013]

References

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

Crossrefs

Subsequence of A000787. Cf. A045574.

Programs

  • Mathematica
    NextPalindrome[n_] := Block[{l = Floor[Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[idn, Ceiling[l/2]]]] > FromDigits[ Take[idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[idn, Ceiling[l/2]], Reverse[ Take[idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]]; np = 0; t = {0}; Do[np = NextPalindrome[np]; If[Union[Join[{0, 1, 8}, IntegerDigits[np]]] == {0, 1, 8}, AppendTo[t, np]], {n, 1150}]; t (* Robert G. Wilson v *)
    TetrNumsUpTo10powerK[k_]:= Select[FromDigits/@ Tuples[{0, 1, 8}, k],IntegerDigits[#] == Reverse[IntegerDigits[#]] &]; TetrNumsUpTo10powerK[7] (* Mikk Heidemaa, May 21 2017 *)
  • PARI
    {for(l=1,5,u=vector((l+1)\2,i,10^(i-1)+(2*i-11&&i==1,2]), print1((v+v\2*6)*u", ")))} \\ The n-th term could be produced by using (partial sums of) A225367 to skip all shorter terms, and then skipping the adequate number of vectors v until n is reached. - M. F. Hasler, May 05 2013
    
  • Python
    from itertools import count, islice, product
    def agen():
        yield from [0, 1, 8]
        for d in count(2):
            for start in "18":
                for rest in product("018", repeat=d//2-1):
                    left = start + "".join(rest)
                    for mid in [[""], ["0", "1", "8"]][d%2]:
                        yield int(left + mid + left[::-1])
    print(list(islice(agen(), 42))) # Michael S. Branicky, Mar 29 2022

Formula

a(n) = digit-wise application of A000578 to A118594(n). - M. F. Hasler, May 08 2013

Extensions

More terms from Robert G. Wilson v, Nov 16 2005

A153806 Strobogrammatic cyclops numbers.

Original entry on oeis.org

0, 101, 609, 808, 906, 11011, 16091, 18081, 19061, 61019, 66099, 68089, 69069, 81018, 86098, 88088, 89068, 91016, 96096, 98086, 99066, 1110111, 1160911, 1180811, 1190611, 1610191, 1660991, 1680891, 1690691, 1810181, 1860981
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2009

Keywords

Comments

Intersection of A000787 and A134808.

Examples

			1680891 is a member because it is the same upside down (A000787) and also a cyclops number (A134808).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^7], And[OddQ@ Length@#, Part[#, Ceiling[Length[#]/2]] == 0, Times @@ Boole@ Map[MemberQ[{0, 1, 6, 8, 9}, #] &, Union@ #] == 1, Count[#, 0] == 1, (Take[#, Floor[Length[#]/2]] /. {6 -> 9, 9 -> 6}) ==
    Reverse@ Take[#, -Floor[Length[#]/2]]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Jul 05 2016 *)
  • Python
    import sys
    f = open('b153806.txt', 'w')
    i = 1
    n = 0
    a = [""]
    r = [""]  #reversed strobogrammatically
    while True:
        for x,y in zip(a,r):
            f.write(str(i)+" "+x+"0"+y+"\n")
            i += 1
            if i>20000:
                f.close()
                sys.exit()
        a = sum([[x+"1",x+"6",x+"8",x+"9"] for x in a],[])
        r = sum([["1"+x,"9"+x,"8"+x,"6"+x] for x in r],[])
    # Kenny Lau, Jul 05 2016

Extensions

Extended beyond 11011 by R. J. Mathar, Jan 17 2009

A057770 The primes in A045574.

Original entry on oeis.org

11, 19, 61, 89, 101, 109, 181, 191, 199, 601, 619, 661, 691, 809, 811, 881, 911, 919, 991, 1009, 1019, 1061, 1069, 1091, 1109, 1181, 1601, 1609, 1619, 1669, 1699, 1801, 1811, 1861, 1889, 1901, 1999, 6011, 6089, 6091, 6101, 6199, 6619, 6661, 6689, 6691
Offset: 1

Views

Author

G. L. Honaker, Jr., Nov 01 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,6,8 , 9},4],PrimeQ] (* Harvey P. Dale, Oct 24 2015 *)

Formula

Primes containing the digits 0, 1, 6, 8 or 9 only.

A111065 Numbers that look the same when rotated by 180 degrees, using only digits 0, 6 and 9.

Original entry on oeis.org

0, 69, 96, 609, 906, 6009, 6699, 6969, 9006, 9696, 9966, 60009, 66099, 69069, 90006, 96096, 99066, 600009, 606909, 609609, 660099, 666999, 669699, 690069, 696969, 699669, 900006, 906906, 909606, 960096, 966996, 969696, 990066, 996966, 999666, 6000009, 6060909
Offset: 1

Views

Author

Paul Stoeber (pstoeber(AT)uni-potsdam.de), Oct 08 2005

Keywords

Comments

Strobogrammatic numbers (A000787) without digits 1 or 8.
Apparently this sequence and A006072 have the same parity. - Jeremy Gardiner, Oct 15 2005
There are no primes in this sequence because all terms are divisible by 3. - M. F. Hasler, May 04 2012

Crossrefs

Cf. strobogrammatic numbers A000787. If 8's are included we get A111156.

Programs

  • Haskell
    main=print$"0":concat[concat[[reverse(reverse(map f x)++z++x)|x<-y]|z<-["","0"]]|y<-s(iterate i"6")];f '0'='0';f '6'='9';f '9'='6';i('0':x)='6':x;i('6':x)='9':x;i('9':x)='0':i x;i""="6";s(x:y@(z:_))=let w:v=s y in if length x==length z then(x:w):v else[x]:w:v
    
  • Mathematica
    fQ[n_] := Block[{s = {0, 6, 9}, id = IntegerDigits[n]}, If[ Union[ Join[s, id]] == s && (id /. {6 -> 9, 9 -> 6}) == Reverse[id], True, False]]; Select[ Range[0, 10^6], fQ[ # ] &] (* Robert G. Wilson v, Oct 11 2005 *)
  • PARI
    is_A111065(n)=!setminus(Set(n=Vec(Str(n))),Vec("069")) & apply(t->Vec("096")[max(eval(t)/3,1)], n)==vecextract(n,"-1..1")  \\ M. F. Hasler, May 04 2012
    
  • 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 0
        for d in count(2):
            for start in "69":
                for rest in product("069", repeat=d//2-1):
                    left = start + "".join(rest)
                    right = ud(left)
                    for mid in [[""], ["0"]][d%2]:
                        yield int(left + mid + right)
    print(list(islice(agen(), 37))) # Michael S. Branicky, Mar 29 2022

Extensions

Offset corrected by Reinhard Zumkeller, Sep 26 2014
a(36) and beyond from Michael S. Branicky, Mar 29 2022
Showing 1-10 of 23 results. Next