A358488 a(1) = 1, a(2) = 2. Thereafter a(n) is least novel m satisfying: 1. If i = a(n-2) and j = a(n-1) are closed, choose m closed to i and open to j. 2. If i and j are open, choose m closed to h = a(n-3) and open to i + j, unless such a solution does not exist, in which case the constraint that m is closed to h is dropped, leaving a(n) as least novel m open to i + j. See comments.
1, 2, 4, 3, 9, 15, 8, 14, 11, 33, 55, 6, 12, 16, 7, 21, 35, 10, 5, 18, 22, 24, 23, 115, 161, 20, 25, 27, 36, 28, 26, 30, 32, 31, 93, 155, 34, 17, 39, 13, 38, 19, 42, 40, 41, 123, 287, 44, 46, 45, 51, 57, 52, 50, 56, 53, 159, 265, 48, 54, 58, 49, 63, 77, 60, 62
Offset: 1
Keywords
Examples
gcd(a(1),a(2)) = 1, so a(3) = 4, the least novel m prime to 1 but not to 2. 2, 4 have common divisor 2 so a(4) = 3, the least novel m prime to 1 but not to 2 + 4 = 6. Since 4 and 3 are coprime, a(5) = 9, the least novel m prime to 4 but not to 3. The first occurrence of i open to j but rad(i+j) | rad(h) happens at the computation of a(32), since a(29,30,31) = 36,28,26, and rad(36) = rad(54) = 6. Here we drop the requirement for a(n) to be prime to 36, and require only that it is open to 28 + 26 = 54; thus a(31) is 30.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Scatterplot of a(n), n = 1..2^14.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12 showing records in red, local minima in blue, highlighting primes in green, and other prime powers in gold.
- Rémy Sigrist, PARI program
Programs
-
Mathematica
Block[{a, c, f, h, i, j, k, u, nn}, nn = 120; c[] = False; f[n] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; i = 1; j = 2; u = 3; Do[k = u; Which[CoprimeQ[i, j], While[Nand[! c[k], CoprimeQ[i, k], ! CoprimeQ[j, k]], k++], Divisible[f[h], f[i + j]], While[Nand[! c[k], ! CoprimeQ[i + j, k]], k++], True, While[Nand[! c[k], CoprimeQ[h, k], ! CoprimeQ[i + j, k]], k++] ]; Set[{a[n], c[k], h, i, j}, {k, True, i, j, k}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Nov 26 2022 *)
-
PARI
\\ See Links section.
Comments