cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A361629 #19 Jul 03 2025 23:41:04
%S A361629 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,
%T A361629 11,84,22,33,24,44,55,30,66,88,27,99,110,40,121,132,36,143,13,154,26,
%U A361629 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
%N 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.
%C A361629 In other words, if R = A007947(a(n-2)*a(n-1)), and S (= 1 or 2) is the smallest number of terms in U divisible by any p|R, then a(n) is the least novel multiple of the greatest p|R which divides S terms in U.
%C A361629 When for some m > 1, a(n-1) = m*p, is the first occurrence of a multiple of prime p, then a(n) = p. The sequence after a(1) = 1 can be represented as an irregular table in which the n-th row T(n,k) starts with p = prime(n), and ends with the first subsequent term divisible by q = prime(n+1). The next row begins with q, and so on. The range of k is not always known; see Formula and Example.
%C A361629 Some primes (2,7,11,13,47,79,113,127,...) exhibit fully developed initial trajectories T(n,k) dominated by multiples of p, until p*q is reached, whereas for others the trajectory ends with a term m*q where m < p.
%C A361629 The scatterplot resembles a fine-toothed comb (as in A361133, A361534), in which each "tooth" represents the initial trajectory of a prime. It is not known whether infinitely many primes exhibit fully developed initial trajectories.
%C A361629 Conjectured to be a permutation of the positive integers with primes in order.
%H A361629 Michael De Vlieger, <a href="/A361629/b361629.txt">Table of n, a(n) for n = 1..16384</a>
%H A361629 Michael De Vlieger, <a href="/A361629/a361629.png">Log log scatterplot of a(n)</a>, n = 1..2^20.
%H A361629 Michael De Vlieger, <a href="/A361629/a361629_1.png">Log log scatterplot of a(n)</a>, 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.
%F A361629 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).
%e A361629 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.
%e A361629 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.
%e A361629 a(3,4) = 4,6 so S = 1 since 3|6 but not 2, so a(5) = 3, since 3 has not appeared previously.
%e A361629 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.
%e A361629 Table T(n) for n = 1..10:
%e A361629   2,4,6
%e A361629   3,8,9,12,10
%e A361629   5,14
%e A361629   7,16,21,28,15,35,42,20,49,56,18,63,70,25,77
%e A361629   11,84,22,33,24,44,55,30,66,88,27,99,110,40,121,132,36,143
%e A361629   13,154,26,39,45,52,65,50,78,91,98,104,117,48,130,156,60,169,182,105,195,208,75,221
%e A361629   17,234,34,51,54,68,85,80,102,119,112,136,153,57
%e A361629   19,69,
%e A361629   23,72,46,92,138,81,115,161,126,184,207,87
%e A361629   29,90,58,116,174,93
%t A361629 Block[{a, c, g, h, i, j, k, p, q, u, w, nn},
%t A361629 nn = 120; c[_] = False; q[_] = 1;
%t A361629 a[1] = i = 1; a[2] = j = 2; c[1] = c[2] = True; w = {1, 2}; u = 3;
%t A361629 Do[If[Equal @@ w, p = Times @@ w[[1]],
%t A361629   g = Reverse@ Union@ Flatten[w];
%t A361629   p = First[
%t A361629      Join @@ Map[ReverseSort,
%t A361629        SplitBy[SortBy[
%t A361629          Table[{p, Count[{i, j}, _?(Divisible[#, p] &)]}, {p, g}],
%t A361629          Last], Last]] ][[1]] ];
%t A361629   k = q[p]; While[c[k*p], k++]; k *= p; While[c[p*q[p]], q[p]++]
%t A361629   Set[{a[n], c[k], w, i, j},
%t A361629       {k, True, Append[w[[2 ;; -1]], FactorInteger[k][[All, 1]]], j, k}];
%t A361629   If[k == u, While[c[u], u++]], {n, 3, nn}];
%t A361629 Array[a, nn] ] (* _Michael De Vlieger_, Mar 18 2023 *)
%Y A361629 Cf. A006094, A007947, A361133, A361534.
%K A361629 nonn
%O A361629 1,2
%A A361629 _David James Sycamore_, Mar 18 2023