OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = 132 because 132 = 2^2 * 3 * 11 is the product of 4 primes (counted with multiplicity) and is the concatenation of the two primes 13 and 2.
MAPLE
cp:= proc(n) local k;
if n::even then n mod 10 = 2 and isprime((n-2)/10)
elif n mod 5 = 0 then isprime((n-5)/10)
else for k from 1 to ilog10(n) do
if isprime(n mod 10^k) and isprime(floor(n/10^k)) then return true fi
od;
false
fi
end proc:
f:= proc(n) uses priqueue; local pq, p, q, T, TP, j, v;
initialize(pq);
insert([-2^n, 2$n], pq);
do
T:= extract(pq);
v:= -T[1];
if cp(v) then return(v) fi;
q:= T[-1];
p:= nextprime(q);
for j from n+1 to 2 by -1 do
if T[j] <> q then break fi;
TP:= [T[1]*(p/q)^(n+2-j), op(T[2..j-1]), p$(n+2-j)];
insert(TP, pq)
od od;
end proc:
map(f, [$1..30]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Jul 15 2024
STATUS
approved