A155874 Smallest positive composite number such that a(n)+n is also composite.
4, 8, 4, 6, 4, 4, 4, 8, 4, 6, 4, 4, 4, 8, 4, 6, 4, 4, 4, 6, 4, 4, 4, 4, 4, 8, 4, 6, 4, 4, 4, 4, 4, 6, 4, 4, 4, 8, 4, 6, 4, 4, 4, 6, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 8, 4, 6, 4, 4, 4, 4, 4, 6, 4, 4, 4, 8, 4, 6, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 8, 4, 6, 4
Offset: 0
Links
- Charlie Neder, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A122984.
Programs
-
PARI
a(n) = {forcomposite(k=4, 10, if (!isprime(k+n), return(k)););} \\ Michel Marcus, Dec 28 2018
Formula
If n+4 is in A001359, a(n) = 8. If n+4 is in A067774, a(n) = 6. Otherwise, a(n) = 4. - Charlie Neder, Dec 28 2018
Extensions
More terms from Charlie Neder, Dec 28 2018
Comments