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 A365117 #19 Aug 24 2023 10:20:53 %S A365117 1,2,3,4,9,8,15,14,27,10,21,16,33,20,39,22,45,26,51,28,57,32,63,34,69, %T A365117 38,75,44,81,40,87,46,93,50,99,52,105,58,111,56,117,62,123,64,129,68, %U A365117 135,74,141,70,153,76,147,80,159,82,165,86,171,88,177,92,183,94 %N A365117 a(1) = 1. Thereafter a(n) is the least novel multiple m of the smallest prime which does not divide a(n-1) and such that m is coprime to a(n-1). %C A365117 The Name is as for A351495, but with an extra constraint: namely that a(n) is prime to a(n-1). %C A365117 {a(n)}; n > 1 is a permutation of A047228. %H A365117 Michael De Vlieger, <a href="/A365117/b365117.txt">Table of n, a(n) for n = 1..10000</a> %H A365117 Michael De Vlieger, <a href="/A365117/a365117.png">Log log scatterplot of a(n)</a>, n = 1..256, showing a(n) mod 6 = 3 in red, a(n) mod 6 = 2 in large dark blue, and a(n) mod 6 = 4 in green dots. Demonstrates 2 trajectories, an early trajectory pertaining to 3 (mod 6) and a late trajectory pertaining to +-2 (mod 6). %H A365117 Michael De Vlieger, <a href="/A365117/a365117_1.png">32 X 32 table of a(n)</a>, n = 1..1024, listed in rows, with a color code according to residue (mod 6). Blue = 2 (mod 6), red = 3 (mod 6), light green = 4 (mod 6), black = 0, 1, or 5 mod 6. %H A365117 Michael De Vlieger, <a href="/A365117/a365117_2.png">30 X 30 table of a(n)</a>, n = 1..900, listed in rows, with a color code as follows: black = empty product, red = prime, gold = composite prime power, light green = squarefree semiprime, green = squarefree number with more than 2 prime factors, purple = powerful number (in A001694) that is not a prime power, blue = other numbers that are neither squarefree nor prime powers. %H A365117 Michael De Vlieger, <a href="/A365117/a365117_3.png">210 X 210 table of a(n)</a>, n = 1..44100, listed in rows with color code as immediately above, demonstrating the aggregate pattern demonstrated in the sequence. Certain residues (mod 210) seem to be devoid of squarefree numbers, perhaps since they are a product 9*m. %F A365117 From _Michael De Vlieger_, Aug 22 2023: (Start) %F A365117 a(2n) == +-2 (mod 6). %F A365117 a(2n+1) == 3 (mod 6), n > 0. (End) %e A365117 a(2) = 2 because 2 is the smallest prime which does not divide 1, and 2 is prime to 1. %e A365117 3(3) = 3 because 3 is the smallest prime which does not divide 2, and 3 is prime to 2. %e A365117 a(4) = 4 since it is the second multiple of 2, the smallest prime that does not divide 3, and 4 is prime to 3. %e A365117 a(5) = 9 since it is the least novel multiple of 3, the smallest prime that does not divide 4, and is the least such number prime to 4. %t A365117 nn = 12; m[_] := 1; a[1] = j = 1; m[1] = 2; c[1] = True; c[_] := False; f[x_] := Block[{q}, q = 2; While[! CoprimeQ[q, x], q = NextPrime[q]]; q]; Do[{k = m[#]; While[Or[! CoprimeQ[j, k], c[# k]], k++]; If[k == m[#], While[c[m[#] #], m[#]++]]; Set[{a[n], j, c[k #]}, {k #, k #, True}]} &@ f[j], {n, 2, nn}]; Array[a, nn] (* _Michael De Vlieger_, Aug 22 2023 *) %o A365117 (PARI) first(n) = {my(res = vector(n)); sofar = Set([1..4]); for(i = 1, 4, res[i] = i); for(i = 5, n, res[i] = nxt(res[i-1])); res} %o A365117 nxt(n) = {my(start, step); if(n % 2 == 0, start = 3; step = 6, start = 2; step = [2,4]); forstep(i = start, oo, step, s = Set(i); if(gcd(i, n) == 1 && #setminus(s, sofar) == 1, sofar = setunion(sofar, s); return(i)))} \\ _David A. Corneth_, Aug 22 2023 %Y A365117 Cf. A047228, A351495. %K A365117 nonn %O A365117 1,2 %A A365117 _David James Sycamore_, Aug 22 2023 %E A365117 More terms from _David A. Corneth_, Aug 22 2023