OFFSET
1,1
COMMENTS
Computed by Eric W. Weisstein, Aug 13 2004.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Emirpimes
EXAMPLE
26 is a semiprime, as it is 2 * 13, and so is 62 = 2 * 31. 26 and 62 are therefore both in the sequence.
MAPLE
isA097393 := proc(n)
local R ;
R := digrev(n) ;
if R <> n then
if numtheory[bigomega](R) = 2 and numtheory[bigomega](n) = 2 then
return true;
else
false;
end if;
else
false;
end if;
end proc:
for n from 1 to 500 do
if isA097393(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Apr 05 2012
MATHEMATICA
Cases[{#, IntegerReverse@#} & /@ DeleteCases[Range@5000, _?PalindromeQ], {_?(PrimeOmega@# == 2 &) ..}][[All, 1]] (* Hans Rudolf Widmer, Jan 07 2024 *)
PROG
(PARI) rev(n)=subst(Polrev(digits(n)), 'x, 10)
issemi(n)=bigomega(n)==2
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
(Python)
from sympy import factorint
from itertools import islice
def sp(n): f = factorint(n); return sum(f[p] for p in f) == 2
def ok(n): r = int(str(n)[::-1]); return r != n and sp(n) and sp(r)
print([k for k in range(534) if ok(k)]) # Michael S. Branicky, Jul 03 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved