OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..1049
FORMULA
a(n) + n >= A053669(n)^n for n > 2 if a(n) exists. - David A. Corneth, Aug 14 2021
EXAMPLE
MATHEMATICA
Table[k=1; While[PrimeOmega[Prime@k+n]!=n, k++]; Prime@k, {n, 11}] (* Giorgos Kalogeropoulos, Jun 25 2021 *)
PROG
(PARI) a(n) = my(p=2); while (bigomega(p+n) != n, p = nextprime(p+1)); p; \\ Michel Marcus, Jun 26 2021
(Python)
from sympy import factorint, nextprime, primerange
def Omega(n): return sum(e for f, e in factorint(n).items())
def a(n):
lb = 2**n
p = nextprime(max(lb-n, 1) - 1)
while Omega(p+n) != n: p = nextprime(p)
return p
print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Aug 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 25 2021
STATUS
approved