A384726 a(n) is the least number that is both the product of n distinct primes and the concatenation of n distinct primes.
2, 35, 273, 11235, 237615, 11237835, 1123317195, 111371237835, 11132343837615, 1113172923477615, 111317233377372295, 11131723677292413195, 1113172377671953734135, 111317192375336174123715
Offset: 1
Examples
a(4) = 11235 is a term because 11235 is the product of four distinct primes 3, 5, 7, 107 and the concatenation of four distinct primes 11, 2, 3, 5, and no smaller number works.
Programs
-
Maple
cdp:= proc(x, n, S) local i,y; if n = 1 then return (not(member(x,S)) and isprime(x)) fi; for i from 1 to ilog10(x)+2-n do y:= x mod 10^i; if member(y,S) or not isprime(y) then next fi; if procname((x-y)/10^i, n-1, S union {y}) then return true fi; od; false end proc: f:= proc(n) uses priqueue; local pq, t, p, x, i, L, v, Lp; initialize(pq); L:= [seq(ithprime(i), i=2..n+1)]; v:= convert(L, `*`); insert([-v, L], pq); do t:= extract(pq); x:= -t[1]; if cdp(x,n,{}) then return x fi; L:= t[2]; p:= nextprime(L[-1]); for i from n to 1 by -1 do if i < n and L[i] <> prevprime(L[i+1]) then break fi; Lp:= [op(L[1..i-1]), op(L[i+1..n]), p]; insert([-convert(Lp, `*`), Lp], pq) od od; end proc: f(1):= 2: map(f, [$1..9]);
Extensions
a(11)-a(14) from Jinyuan Wang, Jun 12 2025
Comments