OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(p) = p+1 for prime p > 2. - Michel Marcus, Mar 13 2017
MATHEMATICA
f[n_] := Block[{k = n + 1}, While[PrimeQ@k || GCD[k, n] > 1, k++ ]; k]; Array[f, 72] (* Robert G. Wilson v *)
PROG
(PARI) a(n) = my(k = n+1); while(isprime(k) || (gcd(n, k) != 1), k++); k; \\ Michel Marcus, Mar 13 2017
(Python)
from sympy import isprime, gcd
def A113484(n):
k = n+1
while gcd(k, n) != 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 13 2006
STATUS
approved