login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125675
a(1)=1; for n>1, a(n) = the (a(n-1)(mod n)+1)-st integer from among those positive integers which do not occur earlier in the sequence.
1
1, 3, 2, 6, 5, 11, 10, 8, 17, 16, 14, 9, 22, 21, 19, 13, 30, 29, 27, 24, 15, 37, 36, 34, 31, 23, 50, 49, 47, 44, 40, 32, 65, 64, 62, 59, 55, 48, 35, 75, 74, 72, 69, 63, 53, 28, 73, 68, 57, 33, 84, 83, 81, 78, 70, 51, 108, 107, 105, 102, 98, 93, 87, 76, 43, 109, 106, 100, 91, 71
OFFSET
1,2
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1, k = 0, c = Mod[l[[ -1]], n] + 1}, While[c > 0, k++; While[MemberQ[l, k], k++ ]; c--; ]; Append[l, k]]; Nest[f, {1}, 70] (* Ray Chandler, Feb 08 2007 *)
CROSSREFS
Sequence in context: A085179 A113782 A090868 * A301501 A072787 A338524
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jan 30 2007
EXTENSIONS
Extended by Ray Chandler, Feb 08 2007
STATUS
approved