OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 0 because the 4th semiprime is 10, and R(10) = 1, which is not divisible by any semiprime.
a(6) = 51 because the 6th semiprime is 15, and R(15) = 51, which is itself semiprime.
a(7) = 4 because the 7th semiprime is 21, R(21) = 12, and 4 is the least semiprime divisor of 12.
MAPLE
r:= proc(n) option remember; local q;
`if`(n<10, n, irem(n, 10, 'q') *10^(length(n)-1)+r(q))
end:
b:= proc(n) option remember; local k;
if n=0 then 0
else for k from b(n-1)+1
while isprime(k) or 2<>add (i[2], i=ifactors(k)[2])
do od; k
fi
end:
a:= proc(n) option remember; local m, k;
m:= r(b(n));
for k from 4 to m do
if irem(m, k)=0 and not isprime(k) and
add(i[2], i=ifactors(k)[2])=2 then return k fi
od; 0
end:
seq(a(n), n=1..100); # Alois P. Heinz, Mar 28 2012
CROSSREFS
KEYWORD
AUTHOR
Jonathan Vos Post, Mar 28 2012
STATUS
approved