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.
%I A176356 #25 Jul 10 2021 04:21:06 %S A176356 1,2,5,10,11,20,50,100,101,110,115,118,121,125,152,158,181,185,188, %T A176356 200,500,1000,1010,1012,1018,1022,1028,1051,1081,1082,1085,1100,1102, %U A176356 1105,1108,1115,1118,1121,1150,1180,1181,1201,1202,1210,1211,1225,1250,1255,1282,1285,1501,1502,1520,1522 %N A176356 Numbers which when seen in a mirror are primes (or 1), using calculator-style 7-segment numerals. %C A176356 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. %C A176356 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. %C A176356 Only entries of A080228 are admitted, because 3's, 4's, 6's, 7's and 9's do not have calculator style images. %C A176356 If this combined operation on n generates an entry in A008578, n is in this sequence here. %D A176356 P. Giannopoulos, The Brainteasers, unpublished. %e A176356 110 is in the sequence because the mirror is 011 = 11 and prime. %e A176356 152 is in the sequence because the mirror is 521 = A000040(98), a prime. %e A176356 31 is not in the sequence because the 3 cannot be mirrored. %e A176356 115 is in the sequence because the mirror is 211 = A000040(47), a prime. %p A176356 calcmirr := proc(n) %p A176356 local L,Lm,i ; %p A176356 L := convert(n,base,10) ; %p A176356 Lm := [] ; %p A176356 for i from 1 to nops(L) do %p A176356 if op(i,L) = 2 then %p A176356 Lm := [5,op(Lm)] ; %p A176356 elif op(i,L) = 5 then %p A176356 Lm := [2,op(Lm)] ; %p A176356 elif op(i,L) in {0,1,8} then %p A176356 Lm := [op(i,L),op(Lm)] ; %p A176356 else %p A176356 return 0 ; %p A176356 end if; %p A176356 end do: %p A176356 add(op(i,Lm)*10^(i-1),i=1..nops(Lm)) ; %p A176356 end proc: %p A176356 isA176356 := proc(n) %p A176356 local m; %p A176356 m := calcmirr(n) ; %p A176356 isprime(m) or (m = 1) ; %p A176356 end proc: %p A176356 for n from 1 to 2001 do %p A176356 if isA176356(n) then %p A176356 printf("%d,",n); %p A176356 end if; %p A176356 end do: # _R. J. Mathar_, Sep 24 2011 %o A176356 (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) %o A176356 \\ _Franklin T. Adams-Watters_. Produces sequence except for initial 1 %Y A176356 Cf. A080228, A080792, A008578 %K A176356 base,easy,nonn %O A176356 1,2 %A A176356 P. Giannopoulos (pgiannop1(AT)yahoo.com), Apr 15 2010, Apr 22 2010 %E A176356 Sequence reconstructed with a consistent interpretation of the definition. - _R. J. Mathar_, Sep 24 2011 %E A176356 Edited by _N. J. A. Sloane_, Oct 24 2011