login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A139713
a(0)=1. For n >=1, a(n) = largest positive integer < a(n-1) that is not coprime to the n-th composite, if such an integer exists. Otherwise, a(n) = smallest integer > a(n-1) that is not coprime to the n-th composite.
2
1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 5, 4, 3, 2, 3, 2, 3, 2, 5, 4, 2, 3, 2, 3, 2, 3, 2, 3, 7, 6, 3, 2, 3, 5, 4, 3, 2, 3, 2, 3, 2, 5, 4, 2, 3, 2, 3, 2, 3, 2, 7, 6, 5, 3, 2, 3, 5, 4, 3, 2, 3, 7, 6, 3, 2, 5, 4, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 5, 4, 3, 2, 7, 6, 11, 10, 9, 8, 5, 4, 2, 3, 2, 3, 7, 6, 5, 4
OFFSET
0,2
CROSSREFS
Sequence in context: A356464 A010693 A158478 * A171465 A178620 A342866
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 30 2008
EXTENSIONS
More terms from Diana L. Mecum, Jul 24 2008
STATUS
approved