|
|
A155874
|
|
Smallest positive composite number such that a(n)+n is also composite.
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
a(0)=4. Adding a(0) to n=0 gives 4+0=4, which is a composite number; adding a(1) to n=1 gives 8+1=9 which is composite; adding a(2) to n=2 gives 4+2=6 which is composite; adding a(3) to n=3 gives 6+3=9 which is composite; etc.
At least one of {n+4, n+6, n+8} is divisible by 3, so a(n) is in {4,6,8} for all n. - Charlie Neder, Dec 28 2018
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI) a(n) = {forcomposite(k=4, 10, if (!isprime(k+n), return(k)); ); } \\ Michel Marcus, Dec 28 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|