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.

A143345 Lexicographically earliest sequence such that a(n) is coprime to the preceding 4 terms (or n-1 terms if n<5) and does not occur earlier.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 4, 9, 13, 17, 19, 8, 15, 23, 29, 31, 14, 25, 27, 37, 41, 16, 35, 33, 43, 47, 26, 49, 45, 53, 59, 22, 61, 21, 65, 67, 32, 71, 51, 55, 73, 28, 79, 39, 83, 85, 38, 77, 69, 89, 97, 10, 91, 57, 101, 103, 20, 107, 63, 109, 113, 34, 95, 81, 121, 127, 46, 119, 75, 131, 137, 44, 133, 87, 115, 139, 52, 149, 93, 125, 151, 56, 143, 111, 145, 157, 62, 161, 99, 163, 167, 40, 169, 123, 173, 179, 50, 181
Offset: 1

Views

Author

M. F. Hasler, Jan 18 2011

Keywords

Comments

One possible extension of A084937, A103683 to N=4. Here, a(4)=5 is chosen such that a(n) is coprime to a(k) for 0 < k < n <= 4. Another choice is a(k)=k (k<=4), which yieds the different sequence A180348.
It appears that:
- no multiples of 6 occur in this sequence, so it is not a permutation of the integers.
- a(n)=3 (mod 6) iff n=3, n=8, n=13 or n=14+5k, k>0.
- a(n)=0 (mod 2) iff n= 2+5k, k>=0.
- powers of 2 occur in natural order.
- powers of 3 occur in natural order.
- powers of any prime p occur in natural order.
- powers of any number occur in natural order.

Programs

  • PARI
    print1("1,2,3"); a=[1,2,3,L=5]; unused=[4]; v=vector(#a,i,1); for(n=4,99, 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))