A361629 For n <= 2, a(n) = n. Thereafter let p be the greatest prime which divides the least number of terms in U = {a(n-2), a(n-1)}, then a(n) is the smallest multiple of p that is not yet in the sequence.
1, 2, 4, 6, 3, 8, 9, 12, 10, 5, 14, 7, 16, 21, 28, 15, 35, 42, 20, 49, 56, 18, 63, 70, 25, 77, 11, 84, 22, 33, 24, 44, 55, 30, 66, 88, 27, 99, 110, 40, 121, 132, 36, 143, 13, 154, 26, 39, 45, 52, 65, 50, 78, 91, 98, 104, 117, 48, 130, 156, 60, 169, 182, 105, 195, 208, 75, 221, 17, 234, 34, 51, 54, 68, 85, 80, 102, 119, 112, 136, 153, 57, 19
Offset: 1
Keywords
Examples
a(1,2) = 1,2 and 2 is the smallest p|R = 2 which divides the least number (1) of terms in U = {1,2}. Therefore a(3) = 4, is the least multiple of 2 which has not already occurred. a(2,3) = 2,4 and since rad(2) = rad(4) = 2, S = 2 then a(4) = 6, the least multiple of 2 which has not occurred earlier. a(3,4) = 4,6 so S = 1 since 3|6 but not 2, so a(5) = 3, since 3 has not appeared previously. The sequence after a(1) can be shown as an irregular table of finite subsequences where each row T(n) starts with prime(n) and ends with the first subsequent multiple of prime(n+1). The table includes the fully developed trajectories of 2,7,11,13 with 3,15,24 terms respectively, each having final term in A006094. T(4) starts with 7, ends with 77 and has 3*(prime(5)-1)/2 = 15 terms. Table T(n) for n = 1..10: 2,4,6 3,8,9,12,10 5,14 7,16,21,28,15,35,42,20,49,56,18,63,70,25,77 11,84,22,33,24,44,55,30,66,88,27,99,110,40,121,132,36,143 13,154,26,39,45,52,65,50,78,91,98,104,117,48,130,156,60,169,182,105,195,208,75,221 17,234,34,51,54,68,85,80,102,119,112,136,153,57 19,69, 23,72,46,92,138,81,115,161,126,184,207,87 29,90,58,116,174,93
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing primes in red, composite prime powers in gold, squarefree composites in green, and numbers neither prime power nor squarefree in blue, accentuating those last-mentioned whose prime power factors have multiplicities exceeding 1 in light blue.
Programs
-
Mathematica
Block[{a, c, g, h, i, j, k, p, q, u, w, nn}, nn = 120; c[] = False; q[] = 1; a[1] = i = 1; a[2] = j = 2; c[1] = c[2] = True; w = {1, 2}; u = 3; Do[If[Equal @@ w, p = Times @@ w[[1]], g = Reverse@ Union@ Flatten[w]; p = First[ Join @@ Map[ReverseSort, SplitBy[SortBy[ Table[{p, Count[{i, j}, _?(Divisible[#, p] &)]}, {p, g}], Last], Last]] ][[1]] ]; k = q[p]; While[c[k*p], k++]; k *= p; While[c[p*q[p]], q[p]++] Set[{a[n], c[k], w, i, j}, {k, True, Append[w[[2 ;; -1]], FactorInteger[k][[All, 1]]], j, k}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Mar 18 2023 *)
Formula
The number of terms T(n,k) is <= 3*(prime(k+1) - 1)/2, with equality when the trajectory is fully developed. The number of terms in shorter trajectories is not readily known. Therefore the irregular table (see Example) is expressed as T(n), rather than T(n,k).
Comments