OFFSET
1,2
COMMENTS
Theorem: even terms cannot be adjacent. Proof: If prime p | j, then p cannot divide k as well, because then (j, k) >= p and by definition of "prime", p > 1, which contradicts the axiom (j, k) = 1. Since 2 is prime, consecutive even terms are prohibited.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^14, showing records in red, local minima in blue, highlighting fixed points in gold, primes in green, and composite prime powers in light green.
MATHEMATICA
nn = 120; s = Range[3]; state = {2, 3, 4, 7}; u = 1; c[_] = 0; f[j_, k_] := Which[j == k, 5, GCD[j, k] == 1, 0, True, 1 + FromDigits[Map[Which[Mod[##] == 0, 1, PowerMod[#1, #2, #2] == 0, 2, True, 0] & @@ # &, Permutations[{k, j}]], 3]]; Array[Set[{a[s[[#]]], c[#]}, {#, s[[#]]}] &, Length[s]]; While[c[u] > 0, u++]; Set[{i, j}, s[[-2 ;; -1]]]; Do[k = u; While[Nand[c[k] == 0, MemberQ[state, f[i, k]], CoprimeQ[j, k]], k++]; Set[{a[n], c[k], i, j}, {k, n, j, k}]; If[k == u, While[c[u] > 0, u++]], {n, Length[s] + 1, nn}]; Array[a, nn]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Jun 23 2022
STATUS
approved