A374665
a(n) is the first number that is the concatenation of n primes and also the product of n primes (counted with multiplicity).
Original entry on oeis.org
2, 22, 222, 2223, 22232, 222222, 2222325, 22222272, 222225552, 2222223255, 22222335232, 222222327525, 2222222372352, 22222222575552, 222222223327232, 2222222225252352, 22222222223327232, 222222222272535552, 2222222222225252352, 22222222222327775232, 222222222222737375232
Offset: 1
a(5) = 22232 because 22232 is the concatenation of the 5 primes 2, 2, 2, 3, 2 and 22232 = 2^3 * 7 * 397 is the product of 5 primes (counted with multiplicity).
-
f:= proc(n) local k, x, W, L, i;
W:= [2,3,5,7];
for k from 0 to 4^n-1 do
L:= convert(4^n+k,base,4);
x:= add(W[L[i]+1]*10^(i-1),i=1..n);
if numtheory:-bigomega(x) = n then return x fi;
od;
end proc:
map(f, [$1..20]);
A374669
a(n) is the least number with n prime factors (counted with multiplicity) that is the concatenation of two primes.
Original entry on oeis.org
23, 22, 27, 132, 32, 729, 192, 2112, 1792, 5632, 3072, 59392, 64512, 90112, 110592, 950272, 2260992, 3244032, 786432, 30277632, 7340032, 23068672, 12582912, 494927872, 1333788672, 1375731712, 704643072, 3892314112, 1879048192, 37446746112, 27380416512, 196494753792, 30064771072, 94489280512
Offset: 1
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.
-
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]);
Showing 1-2 of 2 results.
Comments