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.

Previous Showing 11-20 of 23 results. Next

A018848 Strobogrammatic squares: the same upside down (probably finite).

Original entry on oeis.org

0, 1, 6889, 69169, 109181601
Offset: 1

Views

Author

Keywords

Comments

Square numbers which when written down and rotated by 180 degrees are unchanged.
Subsequence of squares in A000787. - Derek Orr and Michel Marcus, Aug 04 2014

Crossrefs

Cf. A000787, A018849 (similar sequence).

A153807 Strobogrammatic cyclops primes.

Original entry on oeis.org

101, 16091, 1160911, 1180811, 1190611, 1690691, 1880881, 1960961, 1990661, 6110119, 6610199, 6860989, 166906991, 168101891, 169609691, 188906881, 189808681, 196906961, 199609661, 616906919, 661609199, 666101999, 668609899
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2009

Keywords

Comments

Primes in A153806.

Crossrefs

Extensions

Extended by Ray Chandler, May 20 2009

A169731 Numbers that are the same upside down (using only digits 0, 1, 6 and 9).

Original entry on oeis.org

0, 1, 11, 69, 96, 101, 111, 609, 619, 906, 916, 1001, 1111, 1691, 1961, 6009, 6119, 6699, 6969, 9006, 9116, 9696, 9966, 10001, 10101, 11011, 11111, 16091, 16191, 19061, 19161, 60009, 60109, 61019, 61119, 66099, 66199, 69069, 69169, 90006, 90106, 91016, 91116
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2010, based on a suggestion from Terry Stickels

Keywords

Comments

A000787 without using digit 8, considered here as composed of two circles with different radius. 'Same upside down' means central symmetric, that is 180-degree rotationally symmetric about a central axis perpendicular to the screen plane. See the comment by M. F. Hasler in A000787. - Wolfdieter Lang, Oct 25 2013

Crossrefs

Cf. A000787.

Programs

  • 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]
        for d in count(2):
            for start in "169":
                for rest in product("0169", repeat=d//2-1):
                    left = start + "".join(rest)
                    right = ud(left)
                    for mid in [[""], ["0", "1"]][d%2]:
                        yield int(left + mid + right)
    print(list(islice(agen(), 43))) # Michael S. Branicky, Mar 29 2022

Extensions

Extended by T. D. Noe, May 03 2010

A111156 Numbers that look the same when printed upside down.

Original entry on oeis.org

0, 8, 69, 88, 96, 609, 689, 808, 888, 906, 986, 6009, 6699, 6889, 6969, 8008, 8698, 8888, 8968, 9006, 9696, 9886, 9966, 60009, 60809, 66099, 66899, 68089, 68889, 69069, 69869, 80008, 80808, 86098, 86898, 88088, 88888, 89068, 89868, 90006, 90806, 96096, 96896, 98086, 98886, 99066, 99866, 600009
Offset: 1

Views

Author

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

Keywords

Comments

Numbers with 1's are excluded.
Numbers written with digits 0,6,8,9, with 6 and 9 interchanged when reversed. - Robert Israel, Jul 02 2018

Crossrefs

Cf. strobogrammatic numbers A000787. If 8's are excluded we get A111065.

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 '8'='8';f '9'='6';i('0':x)='6':x;i('6':x)='8':x;i('8':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
    
  • Maple
    f:= proc(n) local L,Lp,nl;
       L:= subs(1=6,2=8,3=9,convert(n,base,4));
       nl:= nops(L);
       Lp:= subs([6=9,9=6],L);
       add(Lp[-i]*10^(i-1),i=1..nl)+add(L[i]*10^(nl+i-1),i=1..nl);
    end proc:
    g:= proc(n) local L,Lp,nl;
       L:= subs(1=6,2=8,3=9,convert(n,base,4));
       nl:= nops(L);
       Lp:= subs([6=9,9=6],L);
       seq(add(Lp[-i]*10^(i-1),i=1..nl)+x*10^nl+add(L[i]*10^(nl+i),i=1..nl),x=[0,8]);
    end proc:
    0,8,seq(op([seq(f(n),n=4^i..4^(i+1)-1),seq(g(n),n=4^i..4^(i+1)-1)]),i=0..2); # Robert Israel, Jul 02 2018
  • Mathematica
    Select[Range[0,600010],ContainsOnly[IntegerDigits[#],{0,6,8,9}]&&IntegerReverse[FromDigits[IntegerDigits[#]/.{6->9,9->6}]]==#&] (* James C. McMahon, Apr 30 2024 *)
  • 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, 8]
        for d in count(2):
            for start in "689":
                for rest in product("0689", repeat=d//2-1):
                    left = start + "".join(rest)
                    right = ud(left)
                    for mid in [[""], ["0", "8"]][d%2]:
                        yield int(left + mid + right)
    print(list(islice(agen(), 48))) # Michael S. Branicky, Mar 29 2022

Extensions

Corrected by Robert Israel, Jul 02 2018

A119738 Semiprimes that are semiprimes turned upside-down.

Original entry on oeis.org

6, 9, 69, 106, 111, 119, 611, 669, 689, 698, 699, 818, 866, 869, 901, 998, 1011, 1101, 1111, 1198, 1199, 1661, 1681, 1689, 1691, 1819, 1891, 1919, 1961, 1966, 1991, 6009, 6019, 6109, 6119, 6161, 6181, 6189, 6611, 6686, 6819, 6866, 6889, 6891, 8186, 8611
Offset: 1

Views

Author

Jonathan Vos Post, Jun 15 2006

Keywords

Examples

			19606 = 2 * 9803 upside-down is 90961 = 13 * 6997.
		

Crossrefs

Programs

  • Maple
    UpsideDown := proc(n) local dgs,a,i ; dgs := convert(n,base,10) ; a := [] ; for i from 1 to nops(dgs) do if op(i,dgs) = 6 then a := [9,op(a)] ; elif op(i,dgs) = 9 then a := [6,op(a)] ; else a := [op(i,dgs),op(a)] ; fi; od: add(op(i,a)*10^(i-1),i=1..nops(a)) ; end: isA054047 := proc(n) local dgs,i ; dgs := convert(n,base,10) ; for i from 1 to nops(dgs) do if not op(i,dgs) in {0,1,6,8,9} then RETURN(false) : fi; od: RETURN(true) ; end: isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true; else false; fi; end: isA119738 := proc(n) if isA001358(n) and isA054047(n) then isA001358(UpsideDown(n)) ; else false ; fi; end: for n from 1 to 12000 do if isA119738(n) then printf("%a,",n) ; fi; od: # R. J. Mathar, Sep 09 2008
  • Mathematica
    Select[Range[8611],ContainsOnly[IntegerDigits[#],{0,1,6,8,9}]&&PrimeOmega[#]==2&&PrimeOmega[FromDigits[Reverse[IntegerDigits[#]]/.{6->9,9->6}]]==2&] (* James C. McMahon, Sep 18 2024 *)
  • PARI
    \\ See Corneth link. David A. Corneth, Sep 05 2020

Extensions

8186 inserted by R. J. Mathar, Sep 09 2008

A155584 Array, read by antidiagonals, of n-th strobogrammatic number in base k.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 4, 5, 4, 0, 1, 5, 10, 7, 5, 0, 1, 6, 17, 13, 9, 6, 0, 1, 7, 26, 21, 28, 15, 7, 0, 1, 8, 37, 31, 65, 40, 17, 8, 0, 1, 9, 50, 43, 126, 85, 82, 21, 9, 0, 1, 8, 65, 57, 217, 156, 257, 91, 27, 10, 0, 1, 8, 10, 73, 344, 259, 626, 273, 112, 31, 11, 0, 1, 8, 11, 80, 513, 400, 1297, 651, 325, 121, 33, 12
Offset: 1

Views

Author

Jonathan Vos Post, Jan 24 2009

Keywords

Comments

If a binary number is palindromic, it is also strobogrammatic. In bases 3 through 7, this is not true, where only digits 0 and 1 can be used, because 8 is not a digit, nor are either of the inversion paid (6,9). I do not show bases beyond 10, although admittedly some letters as digits are other letters upside-down.

Examples

			A[2,4] = 5 because 4th strobogrammatic number base 2 = 101 = 5 (base 10). A[9,8] = 154 because 8th strobogrammatic number base 9 = 181 = 154 (base 10). The array begins: ===================================================================================
..n.|.1.|.2.|.3.|..4.|..5.|...6.|...7.|....8.|....9.|...10.|...11.|....12.|
===================================================================================
k=1.|.0.|.1.|.2.|..3.|..4.|...5.|...6.|....7.|....8.|....9.|...10.|....11.|
k=2.|.0.|.1.|.3.|..5.|..7.|...9.|..15.|...17.|...21.|...27.|...31.|....33.|A006995
k=3.|.0.|.1.|.4.|.10.|.13.|..28.|..40.|...82.|...91.|..112.|..121.|...244.|
k=4.|.0.|.1.|.5.|.17.|.21.|..65.|..85.|..257.|..273.|..325.|..341.|..1025.|
k=5.|.0.|.1.|.6.|.26.|.31.|.126.|.156.|..626.|..651.|..756.|..781.|..3126.|
k=6.|.0.|.1.|.7.|.37.|.43.|.217.|.259.|.1297.|.1333.|.1519.|.1555.|..7777.|
k=7.|.0.|.1.|.8.|.50.|.57.|.344.|.400.|.2402.|.2451.|.2752.|.2801.|.16808.|
k=8.|.0.|.1.|.9.|.65.|.73.|.513.|.585.|.4097.|.4161.|.4617.|.4681.|.32769.|
k=9.|.0.|.1.|.8.|.10.|.80.|..82.|..91.|..154.|..656.|..665.|..728.|...730.|
k=10|.0.|.1.|.8.|.11.|.69.|..88.|..96.|..101.|..111.|..181.|..609.|...619.|A000787
===================================================================================
		

Crossrefs

Programs

  • Maple
    strobo := proc(b,n)
            option remember;
            local a;
            if n <=2 then
                    return n-1 ;
            elif b = 1 then
                    return n-1 ;
            else
                    for a from procname(b,n-1)+1 do
                            isstrobo := true ;
                            dgsa := convert(a,base,b) ;
                            for d from 1 to nops(dgsa) do
                                    if op(d,dgsa)=1 and op(-d,dgsa) <> 1 then
                                            isstrobo := false;
                                    elif op(d,dgsa)=8 and op(-d,dgsa) <> 8 then
                                            isstrobo := false;
                                    elif op(d,dgsa)=6 and op(-d,dgsa) <> 9 then
                                            isstrobo := false;
                                    elif op(d,dgsa)=9 and op(-d,dgsa) <> 6 then
                                            isstrobo := false;
                                    elif op(d,dgsa)=0 and op(-d,dgsa) <> 0 then
                                            isstrobo := false;
                                    elif op(d,dgsa) in { 2,3,4,5,7} then
                                            isstrobo := false;
                                    end if;
                            end do;
                            if isstrobo then
                                    return a;
                            end if;
                    end do:
            end if;
    end proc: # R. J. Mathar, Sep 30 2011

A272264 Numbers that become a different number when flipped upside down.

Original entry on oeis.org

6, 9, 16, 18, 19, 61, 66, 68, 81, 86, 89, 91, 98, 99, 106, 108, 109, 116, 118, 119, 161, 166, 168, 169, 186, 188, 189, 191, 196, 198, 199, 601, 606, 608, 611, 616, 618, 661, 666, 668, 669, 681, 686, 688, 691, 696, 698, 699, 801, 806, 809, 811, 816, 819, 861, 866, 868, 869, 881, 886, 889
Offset: 1

Views

Author

A. D. Skovgaard, Apr 24 2016

Keywords

Comments

Although 2 and 5 flipped upside down on a digital clock are numbers, they are not permitted here. - David A. Corneth, May 22 2016

Crossrefs

Programs

  • PARI
    is(n) = {my(d=digits(n),dr); if(d[#d]==0 || #setminus(Set(d),Set([0,1,6,8,9])) !=0, return(0), dr=vector(#d)); for(i=1,#d, dr[#d-i+1] = if(d[i]==6||d[i]==9,15-d[i],d[i]));dr!=d} \\ David A. Corneth, May 22 2016

A339996 Numbers whose square is rotationally ambigrammatic with no trailing zeros.

Original entry on oeis.org

0, 1, 3, 4, 9, 13, 14, 31, 33, 41, 83, 99, 103, 104, 109, 141, 247, 263, 264, 283, 301, 303, 333, 401, 436, 437, 446, 447, 781, 813, 836, 901, 947, 949, 954, 959, 999, 1003, 1004, 1009, 1053, 1054, 1291, 1349, 1367, 2467, 2486, 2609, 2849, 2949, 2986, 3001
Offset: 1

Views

Author

Philip Mizzi, Dec 25 2020

Keywords

Comments

A rotationally ambigrammatic number (A045574) is one that can be rotated by 180 degrees resulting in a readable, most often new number. Such numbers, by definition, can only contain the digits 0, 1, 6, 8, 9.
If the number once rotated happens to be the same number it is a strobogrammatic number (A000787); such numbers form a subset of the ambigrammatic numbers.
Numbers (such as 10) whose square has trailing zeros have been excluded because the rotation of such a number by 180 degrees would result in a number with leading zeros. Typically this is not the way we write numbers.
The numbers 14 and 31 are interesting numbers in this sequence in that when their square is rotated 180 degrees, the square root results in the other number. I believe this is unique to only these two numbers.

Examples

			13^2 = 169. A rotationally ambigrammatic number. Hence, 13 is a term.
15^2 = 225. Not rotationally ambigrammatic and hence 15 is not a term.
10^2 = 100. This number has trailing zeros, so under this definition of rotationally ambigrammatic, 10 is not a term.
		

Crossrefs

Cf. A045574, A340164 (squares).

Programs

  • Mathematica
    Select[Range[0, 4001], (# == 0 || !Divisible[#, 10]) && AllTrue[IntegerDigits[#^2], MemberQ[{0, 1, 6, 8, 9}, #1] &] &] (* Amiram Eldar, Dec 26 2020 *)
  • PARI
    isra(n) = (n%10) && (!setminus(Set(Vec(Str(n))), Vec("01689"))) || !n; \\ A045574
    isok(n) = isra(n^2); \\ Michel Marcus, Dec 27 2020

Formula

a(n) = sqrt(A340164(n)).

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

A215121 Strobogrammatic palindromic numbers in their Roman numeral representation.

Original entry on oeis.org

1, 2, 3, 10, 19, 20, 30
Offset: 1

Views

Author

Jonathan Vos Post, Aug 03 2012

Keywords

Comments

Numbers which, written as Roman numerals, are the same upside down and backwards.
Upside-down-invariant numbers are also called ambigrams. "Upside down" here means rotated by 180 degrees (i.e., central symmetry), NOT "vertically flipped" (symmetry w.r.t. horizontal line).
V, L, C, D, M (5, 50, 100, 500, 1000 in decimal) are not the same upside-down. Excludes "old style" Roman numeral representation of n (e.g., IIII rather than IV).

Examples

			I, II, III, X, XIX, XX, XXX.
		

Crossrefs

Previous Showing 11-20 of 23 results. Next