login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134996 Dihedral calculator primes: p, p upside down, p in a mirror, p upside-down-and-in-a-mirror are all primes. 5

%I #33 Apr 03 2023 10:36:11

%S 2,5,11,101,181,1181,1811,18181,108881,110881,118081,120121,121021,

%T 121151,150151,151051,151121,180181,180811,181081,188011,188801,

%U 1008001,1022201,1028011,1055501,1058011,1082801,1085801,1088081

%N Dihedral calculator primes: p, p upside down, p in a mirror, p upside-down-and-in-a-mirror are all primes.

%C The digits of a(n) are restricted to 0, 1, 2, 5, 8. - _Ivan N. Ianakiev_, Oct 08 2015

%C The first term containing all the possible digits is 108225151. There are 2958 such terms up to 10^12, the last one in this range being 188885250551. - _Giovanni Resta_, Oct 08 2015

%H Alois P. Heinz, <a href="/A134996/b134996.txt">Table of n, a(n) for n = 1..7174</a>

%H C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php?sort=DihedralPrime">Dihedral Prime</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DihedralPrime.html">Dihedral Prime.</a>

%e 120121 is such a number because 120121, 121021 (upside down), 151051 (mirror) and 150151 are all prime. (This is the smallest one in which all four numbers are distinct.)

%t lst1={2,5};

%t startQ[n_]:=First[IntegerDigits[n]]==1;

%t subQ[n_]:=Module[{lst={0,1,2,5,8}},SubsetQ[lst,Union[IntegerDigits[n]]]];

%t rev[n_]:=Reverse[IntegerDigits[n]];

%t updown[n_]:=FromDigits[rev[n]];

%t mirror[n_]:=FromDigits[rev[n]/.{2-> 5,5-> 2}];

%t updownmirror[n_]:=FromDigits[rev[mirror[n]]];

%t lst2=Select[Range@188801,And[startQ[#],subQ[#],PrimeQ[#],PrimeQ[updown[#]],PrimeQ[mirror[#]],PrimeQ[updownmirror[#]]]&];

%t Join[lst1,lst2] (* _Ivan N. Ianakiev_, Oct 08 2015 *)

%Y Cf. A134997, A134998.

%K nonn,base,nice

%O 1,1

%A Mike Keith (domnei(AT)aol.com)

%E 5 added by _Patrick Capelle_, Feb 06 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)