%I A111698 %S A111698 1,5,9,2,7,12,3,10,15,4,13,18,6,16,21,8,19,24,11,22,27,14,25,30,17,28, %T A111698 33,20,31,36,23,34,39,26,37,42,29,40,45,32,43,48,35,46,51,38,49,54,41, %U A111698 52,57,44,55,60,47,58,63,50,61,66,53,64,69,56,67,72,59,70,75,62,73,78 %N A111698 a(1)=1. Skipping over integers occurring earlier in the sequence, count down a composite from a(n) to get a(n+1) so that a(n+1) is the smallest possible positive integer arrived at this way. If there are no positive integers at a distance of a composite number of yet unused integers, instead count up from a(n) 4 (the lowest composite positive integer) positions (skipping already occurring integers) to get a(n+1). %e A111698 The first 5 terms of the sequence can be plotted on the number line as: %e A111698 1,2,*,*,5,*,7,*,9,*,*,*. %e A111698 Now a(5) is 7. Counting down from 7 gets a noncomposite (1,2, or 3) number of steps to arrive at each yet unused positive integer. So we instead count up 4 positions - skipping the 9 as we count - to arrive at 12 (which is at the right-most * of the number-line above). %e A111698 After the 14th term, the successive differences between terms take on the pattern 5,-13,11,5,-13,11,... %H A111698 Diana Mecum, Table of n, a(n) for n = 1..1011 %Y A111698 Cf. A111453, A111118. %Y A111698 Sequence in context: A021632 A011494 A030125 this_sequence A021948 A111453 A129956 %Y A111698 Adjacent sequences: A111695 A111696 A111697 this_sequence A111699 A111700 A111701 %K A111698 nonn %O A111698 1,2 %A A111698 Leroy Quet (qq-quet(AT)mindspring.com), Nov 17 2005 %E A111698 More terms from Diana Mecum (diana.mecum(AT)gmail.com), August 3 2008