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 A377566 #23 Nov 04 2024 20:46:00 %S A377566 1,2,3,6,5,10,20,30,7,14,28,42,84,126,168,210,11,22,44,66,132,198,264, %T A377566 330,660,990,1320,1650,1980,2310,13,26,52,78,156,234,312,390,780,1170, %U A377566 1560,1950,2340,2730,5460,8190,10920,13650,16380,19110,21840,24570,27300,30030,17 %N A377566 Lexicographically earliest infinite sequence of distinct positive integers such that if j = a(n-1) is primorial, a(n) is the smallest prime not already a term, whereas if j is not primorial a(n) is the smallest novel number > j divisible by rad(j). %C A377566 In other words: j in A002110 implies a(n) = p, next missing prime; j not in A002110 implies a(n) = m*rad(j), with minimal novel m. %C A377566 Immediately following odd prime term p = prime(n), 2*p occurs, and as the sequence extends, multiples of intervening primes q; 2<q<=p occur in order until eventually q = prevprime(p), whereupon primorial(n) occurs. A101301(n) gives the number of steps (terms) from prime(n) to A002110(n). %C A377566 Sequence can be generated by the following recursion: If a(t) = prime(n), n > 1 then a(t+k-1) = A060735(k)*prime(n); k = 1,2...A101301(n)+1; see Example. %H A377566 Michael De Vlieger, <a href="/A377566/b377566.txt">Table of n, a(n) for n = 1..10000</a> %H A377566 Michael De Vlieger, <a href="/A377566/a377566.png">Log log scatterplot of log_10 a(n)</a>, n = 1..2^17. %e A377566 If j = a(n-1) is squarefree then a(n) = 2*j. %e A377566 a(9) = prime(4) = 7, A101301(4) = 7, so there are 7+1 = 8 terms from 7 to A002110(4) = 210, namely: A060735(7+k-1)*7, k = 1,2,...8; so: 1*7,2*7,4*7,6*7,12*7,18*7,24*7,30*7 = 7,14,28,42,84,126,168,210. %t A377566 {{1, 2, 3, 6}}~Join~Table[Prime[m + 2]*If[n == 0, 1, Product[Prime[i], {i, n}]]*k, {m, 10}, {n, 0, m}, {k, 1 + Boole[n > 1], If[n == 0, 1, Prime[n + 1]]}] // Flatten %t A377566 (* faster for large datasets, or *) %t A377566 nn = 1000; c[_] := False; m[_] := 1; f[x_] := FactorInteger[x][[All, 1]]; Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 2]; j = 2; u = v = 3; %t A377566 Do[If[Or[IntegerQ@ Log2[j], %t A377566 And[EvenQ[j], Union@ Differences@ PrimePi[#] == {1}] ], %t A377566 k = v, k = Times @@ #; %t A377566 While[c[k m[k]], m[k]++]; k *= m[k]] &[f[j]]; %t A377566 Set[{a[n], c[k], j}, {k, True, k}]; %t A377566 If[k == u, While[c[u], u++]]; %t A377566 If[k == v, While[c[v], v = NextPrime[v] ] ], {n, 3, nn}]; %t A377566 Array[a, nn] (* _Michael De Vlieger_, Nov 04 2024 *) %Y A377566 Cf. A000040, A002110, A005117, A101301. %K A377566 nonn %O A377566 1,2 %A A377566 _David James Sycamore_, Nov 03 2024