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!)
A239307 Semiprimes n = p*q such that reverse(n)=reverse(p)*reverse(q) where reverse(n) is also semiprime. 1

%I #6 Mar 18 2014 05:41:31

%S 4,6,9,22,26,33,39,55,62,77,93,121,143,169,187,202,226,262,303,339,

%T 341,393,505,622,626,707,781,933,939,961,1111,1177,1243,1313,1441,

%U 1469,1661,1717,1991,2042,2062,2066,2206,2402,2426,2446,2462,2602,2642,3063,3093

%N Semiprimes n = p*q such that reverse(n)=reverse(p)*reverse(q) where reverse(n) is also semiprime.

%C Subsequence of A001358.

%H Giovanni Resta, <a href="/A239307/b239307.txt">Table of n, a(n) for n = 1..10000</a>

%e 1469 = 13*113 is in the sequence because reverse(1469)=reverse(13)*reverse(113) => 9641 = 31*311 where 31 and 311 are prime numbers.

%p with(numtheory):lst:={}:T1:=array(1..300):T2:=array(1..300):k:=0:

%p for n from 1 to 1000 do:

%p p:=ithprime(n):xp:=convert(p,base,10):

%p np:=nops(xp):sp:=sum('xp[np-i+1]*10^(i-1)','i'=1..np):

%p if type(sp,prime)=true

%p then

%p k:=k+1:T1[k]:=p:T2[k]:=sp:

%p else

%p fi:

%p od:

%p for i from 1 to k do:

%p for j from i to k do:

%p x:=T1[i]*T1[j]:y:=convert(x,base,10):n2:=nops(y):

%p s:=sum('y[n2-i+1]*10^(i-1)', 'i'=1..n2):

%p if T2[i]*T2[j]=s

%p then

%p lst:=lst union {x}:

%p else

%p fi:

%p od:

%p od:

%p print(lst):

%Y Cf. A007500, A001358.

%K nonn,base

%O 1,1

%A _Michel Lagneau_, Mar 15 2014

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 24 19:24 EDT 2024. Contains 371962 sequences. (Running on oeis4.)