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.

A097393 Emirpimes: numbers n such that n and its reversal are distinct semiprimes.

This page as a plain text file.
%I A097393 #27 Feb 16 2025 08:32:54
%S A097393 15,26,39,49,51,58,62,85,93,94,115,122,123,129,143,155,158,159,169,
%T A097393 177,178,183,185,187,203,205,221,226,265,289,302,314,319,321,326,327,
%U A097393 329,335,339,341,355,381,394,398,413,415,437,493,497,502,511,514,533
%N A097393 Emirpimes: numbers n such that n and its reversal are distinct semiprimes.
%C A097393 Computed by _Eric W. Weisstein_, Aug 13 2004.
%H A097393 Charles R Greathouse IV, <a href="/A097393/b097393.txt">Table of n, a(n) for n = 1..10000</a>
%H A097393 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Emirpimes.html">Emirpimes</a>
%e A097393 26 is a semiprime, as it is 2 * 13, and so is 62 = 2 * 31. 26 and 62 are therefore both in the sequence.
%p A097393 isA097393 := proc(n)
%p A097393     local R ;
%p A097393     R := digrev(n) ;
%p A097393     if R <> n then
%p A097393         if numtheory[bigomega](R) = 2 and numtheory[bigomega](n) = 2 then
%p A097393             return true;
%p A097393         else
%p A097393             false;
%p A097393         end if;
%p A097393       else
%p A097393         false;
%p A097393     end if;
%p A097393 end proc:
%p A097393 for n from 1 to 500 do
%p A097393     if isA097393(n) then
%p A097393         printf("%d,",n) ;
%p A097393     end if;
%p A097393 end do: # _R. J. Mathar_, Apr 05 2012
%t A097393 Cases[{#, IntegerReverse@#} & /@ DeleteCases[Range@5000, _?PalindromeQ], {_?(PrimeOmega@# == 2 &) ..}][[All,1]] (* _Hans Rudolf Widmer_, Jan 07 2024 *)
%o A097393 (PARI) rev(n)=subst(Polrev(digits(n)),'x,10)
%o A097393 issemi(n)=bigomega(n)==2
%o A097393 list(lim)=my(v=List(),r);forprime(p=2,lim\2,forprime(q=2,min(lim\p,p),r=rev(p*q);if(issemi(r)&&r!=p*q,listput(v,p*q))));Set(v) \\ _Charles R Greathouse IV_, Jan 27 2015
%o A097393 (Python)
%o A097393 from sympy import factorint
%o A097393 from itertools import islice
%o A097393 def sp(n): f = factorint(n); return sum(f[p] for p in f) == 2
%o A097393 def ok(n): r = int(str(n)[::-1]); return r != n and sp(n) and sp(r)
%o A097393 print([k for k in range(534) if ok(k)]) # _Michael S. Branicky_, Jul 03 2022
%Y A097393 Cf. A001358, A097394.
%Y A097393 Equals A085751 \ A046328.
%K A097393 nonn,base
%O A097393 1,1
%A A097393 _Jonathan Vos Post_