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!)
A334170 Emirps containing only the digits 1 and 2. 1
111211, 112111, 12122221, 12222121, 1111122121, 1212211111, 11121211121, 11212221121, 12111212111, 12112221211, 111122221121, 111122222111, 111122222221, 111211221221, 111212212211, 111212222111, 111222212111, 111222221111, 112111211221, 112122112211, 112122211121 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Union @ Flatten @ Table[FromDigits /@ Select[Tuples[{1, 2}, n] , PrimeQ @ (m = FromDigits[#]) && # != (r = Reverse[#]) && PrimeQ @ FromDigits[r] &], {n, 12}] (* Amiram Eldar, Apr 18 2020 *)
Table[Select[FromDigits/@Tuples[{1, 2}, n], !PalindromeQ[#]&&AllTrue[ {#, IntegerReverse[ #]}, PrimeQ]&], {n, 12}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 08 2020 *)
PROG
(PARI) isok(p) = if (isprime(p), my(d=digits(p), rd=Vecrev(d)); (vecsort(d, , 8) == [1, 2]) && isprime(fromdigits(rd)) && (rd != d));
lista(nn) = {for (n=1, nn, my(vf = vector(n, k, 1)); for (i=1, 2^n-1, my(vpos = select(x->(x==1), Vecrev(binary(i)), 1), nvf = vf); for (i=1, #vpos, nvf[vpos[i]] = 2; ); my(x = eval(Str(1, fromdigits(Vecrev(nvf)), 1))); if (isok(x), print1(x, ", ")); ); ); } \\ Michel Marcus, Apr 18 2020
CROSSREFS
Intersection of A007931 and A006567.
Subsequence of A020450.
Sequence in context: A109716 A292471 A228253 * A179919 A296370 A206509
KEYWORD
nonn,base
AUTHOR
Daniel Starodubtsev, Apr 17 2020
STATUS
approved

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 April 19 10:56 EDT 2024. Contains 371791 sequences. (Running on oeis4.)