A358534 Start with a(1)=1, a(2)=2. Thereafter, if gcd(a(n-2),a(n-1)) = 1 then a(n) is the smallest unused k such that gcd(a(n-2),k) > 1 and gcd(a(n-1),k) = 1, otherwise a(n) is the smallest unused k such that gcd(a(n-2),k) = 1 and gcd(a(n-1),k) > 1. If the latter is impossible, then a(n) = smallest missing number u. (See comments.)
1, 2, 4, 3, 9, 5, 10, 6, 25, 35, 7, 15, 12, 55, 11, 20, 8, 45, 21, 40, 16, 65, 13, 30, 14, 27, 33, 17, 34, 18, 85, 95, 51, 24, 119, 49, 68, 22, 153, 39, 136, 28, 187, 99, 170, 26, 75, 57, 50, 32, 105, 63, 80, 38, 115, 23, 60, 36, 125, 145, 19, 76, 29, 87, 31, 62
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
- Michael De Vlieger, Scatterplot of a(n), n = 1..2^16.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing records in red, local minima in blue, highlighting primes in green and other prime powers in gold.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing terms generated by condition [1] in blue, [2] in green, and [3] in red.
Crossrefs
Cf. A358093.
Programs
-
Mathematica
nn = 120; c[] = False; q[] = 1; f[n_] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; Set[{i, j, u}, {a[1], a[2], 3}]; Set[{r, s}, {f[i], f[j]}]; Do[Which[CoprimeQ[i, j], If[PrimeNu[j] == 1, While[c[q[s] s], q[s]++]; k = q[s]; While[Nand[! c[s k], CoprimeQ[i, k]], k++]; k *= s, k = u; While[Nand[! c[k], CoprimeQ[i, k], ! CoprimeQ[j, k]], k++]], Divisible[s, r], k = u, True, If[PrimeNu[i] == 1, While[c[q[r] s], q[r]++]; k = q[r]; While[Nand[! c[r k], CoprimeQ[j, k]], k++]; k *= r, k = u; While[Nand[! c[k], ! CoprimeQ[i, k], CoprimeQ[j, k]], k++]] ]; Set[{a[n], c[k], i, j, r, s}, {k, True, j, k, s, f[k]}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn]
Comments