login
A111699
a(1)=1. Skipping over integers occurring earlier in the sequence, count down b(n) (b(n)= number of earlier terms of {a(k)} which are coprime to n) from a(n-1) to get a(n). If this is <= 0, instead count up from a(n-1) b(n) positions (skipping already occurring integers) to get a(n).
1
1, 2, 4, 3, 8, 7, 13, 9, 16, 10, 22, 19, 31, 25, 11, 24, 42, 35, 6, 23, 40, 28, 53, 43, 5, 33, 58, 44, 73, 63, 20, 49, 75, 52, 14, 39, 86, 65, 21, 54, 100, 88, 30, 64, 17, 61, 115, 96, 38, 71, 113, 85, 142, 121, 78, 36, 98, 56, 132, 114, 177, 148, 105, 60, 125, 97, 174, 141, 83
OFFSET
1,2
LINKS
Diana Mecum, Table of n, a(n) for n = 1..900 [From Diana L. Mecum, Aug 04 2008]
EXAMPLE
The first 6 terms of the sequence can be plotted on the number line as:
1,2,3,4,*,*,7,8,*,*,*,*,*.
Now a(6) is 7. Counting b(7) = 5 (because all earlier terms but the 7 are coprime to 7) down from 7 gets a negative integer. So we instead count up 5 positions, skipping the 8 as we count, to arrive at 13 (which is at the rightmost * of the number line above).
CROSSREFS
Sequence in context: A337909 A358523 A365930 * A067179 A318993 A355482
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 17 2005
EXTENSIONS
More terms from Diana L. Mecum, Aug 04 2008
STATUS
approved