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 A263648 #30 Mar 13 2022 03:01:23 %S A263648 4,9,10,21,22,15,14,25,6,35,26,49,34,77,38,33,46,39,58,51,62,57,74,69, %T A263648 82,87,86,93,94,111,106,123,118,129,122,141,134,159,142,177,146,183, %U A263648 158,201,166,213,178,219,194,237,202,249,206,267,214,291,218,303,226,309 %N A263648 a(1)=4, a(2)=9: a(n) is the smallest semiprime not yet appearing in the sequence which is coprime to a(n-1) and not coprime to a(n-2). %C A263648 Contrary to what might be expected (see comment after Proof), a(n) is not a permutation of all semiprimes; it is a permutation of even semiprimes {S_2} and semiprimes with smallest factor 3 {S_3}, plus {25, 35, 49, 77}. Proof (Start): %C A263648 i. The sequence is infinite: we can always consider p*q for a(n+1), where p is the smallest factor in a(n-1) and q is the smallest prime > than the largest factor of any term already appearing in the sequence; %C A263648 ii. a(15)=38 = 2*19 = 2*prime(8) and a(16)=33 = 3*11 = 3*prime(5); %C A263648 iii. all {S_2} <= 38 and {S_3} <= 33 have appeared up to a(16), with 38 and 33 being maximum terms in {S_2} and {S_3}, respectively; %C A263648 iv. all semiprimes with smallest factor >= 5 which are < 2*prime(9)=46 and 3*prime(6)=39 have appeared up to a(16). Consequently, the terms starting at a(17)=46 alternate between 2*prime(k) and 3*prime(k-3) k=9..infinity. %C A263648 v. the only other numbers to have appeared are {25, 35, 49, 77}. %C A263648 (End) %C A263648 The above behavior is in contrast to A119718 (a permutation of all semiprimes because it lacks the constraint of a(n) being not coprime to a(n-2)). Interestingly, this sequence (A263648) shares the same essential rules as A098550 (the Yellowstone permutation) and many of its variations, while A119718 does not; one therefore might expect the opposite behavior to occur between this sequence and A119718. What observations or generalizations might we draw from this? %H A263648 Michael De Vlieger, <a href="/A263648/b263648.txt">Table of n, a(n) for n = 1..10000</a> %H A263648 David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, <a href="http://arxiv.org/abs/1501.01669">The Yellowstone Permutation</a>, arXiv preprint arXiv:1501.01669 [math.NT], 2015. Also Journal of Integer Sequences, Vol. 18 (2015), Article 15.6.7 %H A263648 Michael De Vlieger, <a href="/A263648/a263648.png">Annotated scatterplot of (n, k)</a>, where k is the position of a(n) in A001358, for n = 1..48. Color code: even a(n) in red, 3 | a(n) in blue, 6 | a(n) in purple, else black. %H A263648 Michael De Vlieger, <a href="/A263648/a263648_1.png">Log-log scatterplot of a(n)</a>, n = 1..2^18, showing even terms in red, 3 | a(n) in blue, 6 | a(n) in purple, else black. The first 15 terms are labeled. %F A263648 For n >= 15: %F A263648 a(n) = 2*prime((n+1)/2) when n is odd; %F A263648 a(n) = 3*prime(n/2-3) when n is even. %t A263648 a[1]=4; a[2]=9; a[n_] := a[n] = Module[{k}, For[k=6, True, k++, If[MatchQ[ FactorInteger[k], {{_, 1}, {_, 1}}|{{_, 2}}] && FreeQ[Array[a, n-1], k] && CoprimeQ[k, a[n-1]] && !CoprimeQ[k, a[n-2]], Return[k]]]]; Array[a, 60] (* _Jean-François Alcover_, Oct 06 2018 *) %Y A263648 Cf. A098550, A119718, A000040 (primes), A100484 (even semiprimes), A001748 (essentially, semiprimes with smallest factor 3). %K A263648 nonn %O A263648 1,1 %A A263648 _Bob Selcoe_, Oct 22 2015 %E A263648 More terms from _Jean-François Alcover_, Oct 06 2018