%I #12 Sep 25 2024 16:14:16
%S 2,3,43,13,239,59,171869,569,32797,2551,649529,6133,1708984363,57331,
%T 103630981,65521,301327031,262127,82244873046857,11943917,38354628391,
%U 26214379,679922958173,37748713,584125518798828101,553648103,7625597484961,2281701349,882592301503097,8153726947
%N Least prime p such that p+n is product of (n+1) primes (with multiplicity).
%C For n>0, terms with odd indices 3, 13, 59, 569... are much smaller than neighbor terms with even indices.
%C For n > 0, a(n) >= A053669(n)^(n+1) - n. - _Robert Israel_, Sep 25 2024
%H Robert Israel, <a href="/A255092/b255092.txt">Table of n, a(n) for n = 0..1000</a>
%e 2+0=2(prime), 3+1=4=2*2, 43+2=45=3*3*5, 13+3=16=2^4, 239+4=243=3^5,59+5=64=2^6,171869+6=171875=5^6*11,569+7=574=2^6*3^2,
%e 32797+8=32805=3^5*5, 2551+9=2590=2^9*5, 649529+10=649539=3^10*11, 6133+11=6143=2^11*3.
%p f:= proc(n)
%p uses priqueue;
%p local pq, t, v, p,w,i;
%p initialize(pq);
%p p:= 2;
%p while n mod p = 0 do p:= nextprime(p) od;
%p insert([-p^(n+1),[p$(n+1)]],pq);
%p do
%p t:= extract(pq);
%p v:= -t[1]; w:= t[2];
%p if isprime(v-n) then return v-n fi;
%p p:= nextprime(w[-1]);
%p while n mod p = 0 do p:= nextprime(p) od:
%p for i from n+1 to 1 by -1 while w[i] = w[n+1] do
%p insert([t[1]*(p/w[n+1])^(n+2-i),[op(w[1..i-1]),p$(n+2-i)]],pq);
%p od od
%p end proc:
%p f(0):= 2:
%p map(f, [$0..40]); # _Robert Israel_, Sep 25 2024
%Y Cf. A053669, A072875, A112998, A113000, A113008.
%K nonn,look
%O 0,1
%A _Zak Seidov_, Feb 14 2015
%E More terms from _Robert Israel_, Sep 25 2024