cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jan 18 2011

Keywords

Comments

One possible generalization of A084937 resp. A103683 to N=4, cf. A143345 for a different version.

Programs

  • 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))