A113496 a(n) = smallest composite integer > c(n) and coprime to c(n), where c(n) is the n-th composite integer.
9, 25, 9, 10, 21, 25, 15, 16, 21, 25, 21, 22, 25, 25, 26, 27, 28, 33, 49, 33, 34, 35, 36, 49, 39, 40, 49, 55, 45, 46, 49, 49, 50, 51, 52, 55, 55, 56, 57, 58, 63, 77, 63, 64, 65, 66, 85, 69, 70, 81, 77, 75, 76, 77, 78, 85, 81, 82, 85, 85, 86, 87, 88, 91, 91, 92, 93, 94, 95, 96
Offset: 1
Keywords
Programs
-
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 *)
-
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
Formula
Extensions
More terms from Robert G. Wilson v, Jan 12 2006