OFFSET
0,2
EXAMPLE
a(3) = 873 because Omega(873) = Omega(3^2*97) = 3, Omega(873+2) = Omega(5^3*7) = 4 and 873 is the smallest such integer.
MATHEMATICA
a[n_] := Block[{ov=0, v=1, k=3}, While[ov != n || v != n+1, ov = v; k += 2; v = PrimeOmega@ k]; k-2]; a /@ Range[0, 6]
PROG
(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, my(t=m*q); if(bigomega(t-2) == k, listput(list, t-2))), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 3, 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 08 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Giovanni Resta, Jun 11 2020
EXTENSIONS
a(12)-a(18) from Daniel Suteu, Jul 08 2023
STATUS
approved