OFFSET
1,1
FORMULA
MATHEMATICA
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; f[n_] := Block[{k = n + 1}, While[PrimeQ@k || GCD[k, n] > 1, k++ ]; k]; Array[ f[ Composite[ # ]] &, 70] (* Robert G. Wilson v, Jan 12 2006 *)
PROG
(Python)
from sympy import isprime, gcd, composite
def A113496(n):
m = composite(n)
k = m+1
while gcd(k, m) != 1 or isprime(k):
k += 1
return k # Chai Wah Wu, Mar 28 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 11 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jan 12 2006
STATUS
approved