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

A080792 Numbers which when seen in a mirror are different numbers.

Original entry on oeis.org

2, 5, 10, 12, 15, 18, 20, 21, 22, 28, 50, 51, 55, 58, 80, 81, 82, 85, 100, 102, 105, 108, 110, 115, 118, 120, 121, 125, 150, 151, 152, 158, 180, 182, 185, 200, 202, 208, 210, 212, 218, 220, 221, 225, 228, 250, 252, 258, 280, 282, 288, 500, 505
Offset: 1

Views

Author

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

Keywords

References

  • P. Giannopoulos, The Brainteasers, unpublished.

Crossrefs

A176356 Numbers which when seen in a mirror are primes (or 1), using calculator-style 7-segment numerals.

Original entry on oeis.org

1, 2, 5, 10, 11, 20, 50, 100, 101, 110, 115, 118, 121, 125, 152, 158, 181, 185, 188, 200, 500, 1000, 1010, 1012, 1018, 1022, 1028, 1051, 1081, 1082, 1085, 1100, 1102, 1105, 1108, 1115, 1118, 1121, 1150, 1180, 1181, 1201, 1202, 1210, 1211, 1225, 1250, 1255, 1282, 1285, 1501, 1502, 1520, 1522
Offset: 1

Views

Author

P. Giannopoulos (pgiannop1(AT)yahoo.com), Apr 15 2010, Apr 22 2010

Keywords

Comments

We construct mirror images of numbers by placing a mirror parallel to the baseline at an acute angle and looking at them from the top of the sheet they are written on.
This defines the mirror images by fixing digits 0, 1 and 8, exchanging 2 and 5, reversing the order of the digits and ignoring leading zeros that may result.
Only entries of A080228 are admitted, because 3's, 4's, 6's, 7's and 9's do not have calculator style images.
If this combined operation on n generates an entry in A008578, n is in this sequence here.

Examples

			110 is in the sequence because the mirror is 011 = 11 and prime.
152 is in the sequence because the mirror is 521 = A000040(98), a prime.
31 is not in the sequence because the 3 cannot be mirrored.
115 is in the sequence because the mirror is 211 = A000040(47), a prime.
		

References

  • P. Giannopoulos, The Brainteasers, unpublished.

Crossrefs

Programs

  • Maple
    calcmirr := proc(n)
            local L,Lm,i ;
            L := convert(n,base,10) ;
            Lm := [] ;
            for i from 1 to nops(L) do
                    if op(i,L) = 2 then
                            Lm := [5,op(Lm)] ;
                    elif op(i,L) = 5 then
                            Lm := [2,op(Lm)] ;
                    elif op(i,L) in {0,1,8} then
                            Lm := [op(i,L),op(Lm)] ;
                    else
                            return 0 ;
                    end if;
            end do:
            add(op(i,Lm)*10^(i-1),i=1..nops(Lm)) ;
    end proc:
    isA176356 := proc(n)
            local m;
            m := calcmirr(n) ;
            isprime(m) or (m = 1) ;
    end proc:
    for n from 1 to 2001 do
            if isA176356(n) then
                    printf("%d,",n);
            end if;
    end do: # R. J. Mathar, Sep 24 2011
  • PARI
    isa(n)=local(r,d); while(n>0, d=n%10; if(d==2, d=5, if(d==5,d=2, if(d==3||d==4||d==6||d==7||d==9, return(0)))); r=r*10+d; n\=10); isprime(r)
    \\ Franklin T. Adams-Watters. Produces sequence except for initial 1

Extensions

Sequence reconstructed with a consistent interpretation of the definition. - R. J. Mathar, Sep 24 2011
Edited by N. J. A. Sloane, Oct 24 2011

A321310 List of pairs of numbers with mirror symmetry (calculator-style numerals).

Original entry on oeis.org

0, 0, 1, 1, 2, 5, 5, 2, 8, 8, 11, 11, 12, 51, 15, 21, 18, 81, 21, 15, 22, 55, 25, 25, 28, 85, 51, 12, 52, 52, 55, 22, 58, 82, 81, 18, 82, 58, 85, 28, 88, 88, 101, 101, 102, 501, 105, 201, 108, 801, 111, 111, 112, 511, 115, 211, 118, 811, 121, 151, 122, 551
Offset: 0

Views

Author

Kritsada Moomuang, Nov 03 2018

Keywords

Comments

2 and 5 are taken as mirror images (as on calculator displays).

Examples

			The sequence begins:
   0,  0;
   1,  1;
   2,  5;
   5,  2;
   8,  8;
  11, 11;
  12, 51;
  15, 21;
  18, 81;
  21, 15;
  22, 55;
  25, 25;
  28, 85;
...
81 has its reflection as 18 in a mirror.
125 has its reflection as 251 in a mirror.
		

Crossrefs

Programs

  • Mathematica
    {0, 0}~Join~Array[If[Mod[#, 10] == 0, Nothing, If[IntegerLength[#1] == Length[#2], {#1, FromDigits@ #2}, Nothing] & @@ {#, Reverse@ IntegerDigits@ # /. {2 -> 5, 3 -> Nothing, 4 -> Nothing, 5 -> 2, 6 -> Nothing, 7 -> Nothing, 9 -> Nothing}}] &, 123] // Flatten (* Michael De Vlieger, Nov 05 2018 *)
Showing 1-3 of 3 results.