%I #22 Apr 25 2023 01:01:53
%S 1,2,6,3,12,4,10,5,15,9,18,8,14,7,21,27,24,16,20,25,30,32,22,11,33,66,
%T 36,42,28,49,35,70,40,60,45,81,39,13,26,64,34,17,51,102,48,78,52,128,
%U 38,19,57,114,54,84,56,126,63,105,75,90,50,110,44,121,55,125
%N a(1) = 1, a(2) = 2. Let j = a(n-1) and let m = omega(gcd(j, k)) with gcd(j, k) > 1. For n > 2, a(n) = least k such that min(omega(j), omega(k)) = m and m < max(omega(j), omega(k)).
%C Let P = the set of distinct prime divisors of j = a(n-1), and let Q = the set of distinct prime divisors of k = a(n). Let g = gcd(j, k) > 1 and let G = {P intersect Q}. Noncoprime j and k implies |G| > 0. This sequence is such that |G| > 0, |P| > |G|, and |Q| == |G|, or vice versa.
%C Coprimality and equality are forbidden, forcing primes into divisibility. Because of this, a(i) = mp -> a(i+1) = p -> a(i+2) = sp, with composite m and s not powers of p > 2. For n > i, multiples of p including powers may appear in the sequence. Consequently, odd primes enter the sequence late.
%C Numbers m that immediately precede and follow prime p have omega(m) > 1.
%C For any adjacent pair of terms with n > 1, if one is prime then the other cannot be a power of that prime, since such a pair would have the same number of distinct prime divisors.
%C This sequence requires an asymmetric version of the relation of j and k seen in A337687. In that sequence, we have P != Q, |P| > |G| and |Q| > |G|, therefore we have symmetry in that there is at least 1 prime p | j that does not divide k, and at least 1 prime q | k that does not divide j. That sequence occurs among composites m with omega(m) > 1, but this sequence admits primes, since, for |G| = 1, we must have |P| or |Q| equal to 1, and there is no prohibition for multiplicity to exceed 1.
%C A353917 is a version of this sequence that prohibits divisibility, hence primes do not appear, but composite prime powers do.
%C Open question: do the primes appear in order? (They do for n <= 2^16).
%H Michael De Vlieger, <a href="/A353916/b353916.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A353916/a353916.png">Annotated log log scatterplot of a(n)</a>, n = 1..2^12, showing records in red and local minima in blue, highlighting fixed points in gold and primes in green.
%H Michael De Vlieger, <a href="/A353916/a353916_1.png">Prime power factor study of a(n)</a>, n = 1..2^13 where n increases from left to right, and pi(p) from bottom to top in the top image. Multiplicity e of p^e is represented by black for e = 1, red for e = 2, and a color function to the maximum multiplicity in the range thereafter. On the lower bar we show primes in red, composite prime powers in yellow, squarefree numbers m with omega(m) > 1 in green, and nonsquarefree composite numbers m with omega(m) > 1 (i.e., in A126706) in blue.
%H <a href="/index/Ed#EKG">Index entries for sequences related to EKG sequence</a>
%t nn = 2^8; c[_] = 0; a[1] = c[1] = 1; j = a[2] = c[2] = 2; u = 3; Do[Set[k, u]; Set[m, PrimeNu[j]]; While[Nand[c[k] == 0, And[#2 > #3, #1 == #3] & @@ Append[Sort[{m, PrimeNu[k]}], PrimeNu[GCD[j, k]]]], k++]; Set[{a[i], c[k]}, {k, i}]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]; Array[a, nn]
%Y Cf. A064413, A337687, A353917.
%K nonn
%O 1,2
%A _Michael De Vlieger_, May 10 2022