OFFSET
1,1
COMMENTS
Some semiprime near-misses for a(3): 35, 323, 365, 3103, 3173, 3493, 3755, 31673, 34993, 37495, 349993, 3166673, 34999993, 31666666673. - Michel Marcus, May 08 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..80
EXAMPLE
a(4) = 410 because the divisors of 410 are {1, 2, 5, 10, 41, 82, 205, 410} and 10 is the 4th divisor of 410.
MAPLE
# this program tests k < 150000; results of 0 may be incorrect.
with(numtheory):nn:=51:
for n from 1 to nn do:
ii:=0:
for k from n to 150000 while(ii=0)do:
i:=length(k):p:=n*10^i+k:
x:=divisors(p):n0:=nops(x):
if n<=n0 then
d:=x[n]:j:=length(d):q:=n*10^j+d:
if p=q then
ii:=1:printf ( "%d %d \n", n, p):
else
fi:fi:
od:
if ii=0 then printf ( "%d %d \n", n, 0):
else
fi:
od:
# Alternative
f:= proc(n)
local F, m, t, primes, enum, cands, d, divs;
F:= ifactors(n)[2];
primes:= {seq(t[1], t=F)} union {2, 5};
for t in F do m[t[1]]:= t[2] od;
m[2]:= n; m[5]:= n;
enum:= proc(pr, t)
local p, r;
if pr = {} or t <= 1 then return [1] fi;
p:= pr[1];
r:= pr[2..-1];
[seq(op(map(`*`, procname(r, floor(t/(1+j))), p^j)), j=0..m[p])]
end proc;
cands:= sort(enum(primes, n));
for d in cands do
divs:= sort(convert(numtheory:-divisors(n*10^(1+ilog10(d))+d), list));
if nops(divs) >= n and divs[n] = d then return(n*10^(1+ilog10(d))+d) fi;
od;
0
end proc:
seq(f(n), n=1..60); # Robert Israel, Jun 08 2015
CROSSREFS
KEYWORD
nonn,base,hard
AUTHOR
Michel Lagneau, Apr 26 2015
EXTENSIONS
a(21), a(45) and a(48) from Robert Israel, Jun 08 2015
STATUS
approved