%I #17 Apr 04 2015 21:38:08
%S 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,
%T 47,26,49,45,53,59,22,61,21,65,67,32,71,51,55,73,28,79,39,83,85,38,77,
%U 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
%N 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.
%C 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.
%C It appears that:
%C - no multiples of 6 occur in this sequence, so it is not a permutation of the integers.
%C - a(n)=3 (mod 6) iff n=3, n=8, n=13 or n=14+5k, k>0.
%C - a(n)=0 (mod 2) iff n= 2+5k, k>=0.
%C - powers of 2 occur in natural order.
%C - powers of 3 occur in natural order.
%C - powers of any prime p occur in natural order.
%C - powers of any number occur in natural order.
%H Zak Seidov, <a href="/A143345/b143345.txt">Table of n, a(n) for n = 1..5000</a>
%o (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))
%K nonn
%O 1,2
%A _M. F. Hasler_, Jan 18 2011
|