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.
%I A338351 #20 Jan 03 2021 04:47:48 %S A338351 1,3,15,35,77,33,39,65,55,99,21,91,143,165,51,119,133,57,45,85,187, %T A338351 209,95,75,63,161,115,135,87,203,175,155,93,69,253,275,105,111,407, %U A338351 319,145,185,259,147,117,221,323,171,123,205,215,129,141,235,245,189,153,391,299,195,159,371 %N A338351 Lexicographically earliest infinite sequence {a(n)} of distinct odd positive numbers such that, for n>2, a(n) has a common factor with a(n-1) but not with a(n-2). %C A338351 A version of A336957 defined just on the odd numbers. %C A338351 Let Ker(k), the kernel of k, denote the set of primes dividing k. Thus Ker(36) = {2,3}, Ker(1) = {}. Then Product_{p in Ker(k)} p = A000265(k), which is denoted by ker(k). %C A338351 Theorem 1: For n>2, a(n) is the smallest odd number m not yet in the sequence such that %C A338351 (i) Ker(m) intersect Ker(a(n-1)) is nonempty, %C A338351 (ii) Ker(m) intersect Ker(a(n-2)) is empty, and %C A338351 (iii) The set Ker(m) \ Ker(a(n-1)) is nonempty. %H A338351 N. J. A. Sloane, <a href="/A338351/b338351.txt">Table of n, a(n) for n = 1..10000</a> %p A338351 with(numtheory); %p A338351 N:= 10^3: # to get a(1) to a(n) where a(n+1) is the first term > N %p A338351 B:= Vector(N, datatype=integer[1]): %p A338351 A[1]:=1; A[2]:=3; %p A338351 for n from 3 do %p A338351 for k from 5 to N by 2 do %p A338351 if B[k] = 0 and igcd(k, A[n-1]) > 1 and igcd(k, A[n-2]) = 1 then %p A338351 if nops(factorset(k) minus factorset(A[n-1])) > 0 then %p A338351 A[n]:= k; %p A338351 B[k]:= 1; %p A338351 break; %p A338351 fi; %p A338351 fi; %p A338351 od: %p A338351 if k > N then break; fi; %p A338351 od: %p A338351 s1:=[seq(A[i], i=1..n-1)]; %o A338351 (PARI) a338351(upto)={my(v=[1,3]);for(n=1,upto,forstep(k=5,oo,2,if(!vecsearch(vecsort(v),k),if(gcd(k,v[#v])>1&&gcd(k,v[#v-1])==1,if(#setminus(Set(factor(k)[,1]),Set(factor(v[#v])[,1]))>0,v=concat(v,[k]);break)))));v}; %o A338351 a338351(60) \\ _Hugo Pfoertner_, Oct 30 2020 %Y A338351 Cf. A000265, A336957. %K A338351 nonn %O A338351 1,2 %A A338351 _N. J. A. Sloane_, Oct 30 2020