OFFSET
1,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(12) = min {k such that k|R(12) and k = p*q for primes p and q (not necessarily distinct)} = min {k, k|21 and k semiprime} = 21 = 3*7.
a(42) = min {k, k|24 and k semiprime} = min {4,6} = 4 = 2*2.
MAPLE
r:= proc(n) option remember; local q;
`if`(n<10, n, irem(n, 10, 'q') *10^(length(n)-1)+r(q))
end:
a:= proc(n) local m, k;
m:= r(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 26 2012
MATHEMATICA
spd[n_]:=Module[{sps=Select[Divisors[FromDigits[Reverse[ IntegerDigits[n]]]], PrimeOmega[#] == 2&, 1]}, If[sps=={}, 0, First[sps]]]; Array[spd, 80] (* Harvey P. Dale, Aug 12 2012 *)
CROSSREFS
KEYWORD
AUTHOR
Jonathan Vos Post, Mar 24 2012
STATUS
approved