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”).

A180348
Lexicographically earliest sequence such that a(n) is coprime to the preceding 4 terms and does not occur earlier; a(n) = n for n=1,2,3,4.
1
1, 2, 3, 4, 5, 7, 11, 9, 8, 13, 17, 19, 15, 14, 23, 29, 31, 25, 6, 37, 41, 43, 35, 12, 47, 53, 59, 49, 10, 27, 61, 67, 71, 16, 21, 55, 73, 79, 26, 51, 77, 83, 89, 20, 39, 97, 101, 103, 22, 45, 91, 107, 109, 32, 33, 65, 113, 119, 38, 69, 121, 125, 127, 28, 57, 131, 85, 137, 44, 63, 139, 95, 149, 34, 81, 143, 115, 133, 58
OFFSET
1,2
COMMENTS
One possible generalization of A084937 resp. A103683 to N=4, cf. A143345 for a different version.
PROG
(PARI) N=99; print1("1, 2, 3"); a=[1, 2, 3, L=4]; unused=[]; v=vector(#a, i, 1); for(n=#a, N, print1(", "a[#a]); for(i=1, #unused, apply(x->gcd(x, unused[i]), a)==v || next; a=concat(vecextract(a, "^1"), unused[i]); unused=vecextract(unused, Str("^", i)); next(2)); L++; while(apply(x->gcd(x, L), a) !=v, unused=concat(unused, L++-1); ); a=concat(vecextract(a, "^1"), L))
CROSSREFS
Sequence in context: A057496 A345663 A191864 * A001729 A001087 A191876
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 18 2011
STATUS
approved