OFFSET
0,2
COMMENTS
Dickson's conjecture implies that a(n) exists for each n.
EXAMPLE
a(3)= 99 because 99=3^2*11 has three prime factors (counted with multiplicity) and 99+1=2^2*5^2 has four, and 99 is the least number with those properties.
MAPLE
b:= 0:
for n from 2 do
a:= b;
b:= numtheory:-bigomega(n);
if b = a+1 and not assigned(A[a]) then
A[a]:= n-1;
if a = 9 then break fi
fi
od:
seq(A[i], i=0..9);
MATHEMATICA
a[n_] := Module[{k = 1}, While[PrimeOmega[k] != n || PrimeOmega[k + 1] != n + 1, k++]; k]; Array[a, 10, 0] (* Amiram Eldar, Dec 03 2018 *)
PROG
(PARI)
isok(n, k) = bigomega(k) == n && bigomega(k+1) == n+1;
a(n) = for(k=1, oo, if(isok(n, k), return(k))); \\ Daniel Suteu, May 05 2022
(PARI)
generate(A, B, n, k) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, if(bigomega(m*q-1) == k, listput(list, m*q-1))), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 2, n)));
a(n) = my(x=2^n, y=2*x); while(1, my(v=generate(x, y, n+1, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jul 09 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert Israel and J. M. Bergot, Dec 02 2018
EXTENSIONS
a(9)-a(13) from Rémy Sigrist, Dec 03 2018
a(14)-a(18) from Giovanni Resta, Jun 11 2020
a(19)-a(21) from Daniel Suteu, May 05 2022
a(22)-a(23) from Daniel Suteu, Jul 09 2023
STATUS
approved