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.

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.

This page as a plain text file.
%I A358488 #24 Jul 02 2025 20:56:30
%S A358488 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,
%T A358488 20,25,27,36,28,26,30,32,31,93,155,34,17,39,13,38,19,42,40,41,123,287,
%U A358488 44,46,45,51,57,52,50,56,53,159,265,48,54,58,49,63,77,60,62
%N 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.
%C A358488 (i,j) "closed" means gcd(i,j) = 1, whereas "open" means gcd(i,j)>1.
%C A358488 When (i,j) is closed condition 1 applies, and a solution for a(n) exists, since we can choose m as any multiple k*p of a prime p which divides j but not i, where k is any number prime to i.
%C A358488 When (i,j) is open condition 2 applies. If there is a prime p which divides i+j but does not divide h, then a solution for a(n) exists. If there is no such prime (rad(i+j)|rad(h)), then there is no number closed to h and open to i+j, so the requirement for (h,a(n))=1 is dropped, whereby a solution for a(n) is assured because there are infinitely many numbers open to i + j. This happens first at a(32), see Example, and occurs a total of 46 times in the first 16000 terms.
%C A358488 a(n) can be derived from its predecessors as the least novel term satisfying the definition, hence the sequence is infinite.
%C A358488 The primes do not appear in natural order (11 precedes 5). Is this a permutation?
%H A358488 Michael De Vlieger, <a href="/A358488/b358488.txt">Table of n, a(n) for n = 1..10000</a>
%H A358488 Michael De Vlieger, <a href="/A358488/a358488.png">Scatterplot of a(n)</a>, n = 1..2^14.
%H A358488 Michael De Vlieger, <a href="/A358488/a358488_1.png">Log log scatterplot of a(n)</a>, n = 1..2^12 showing records in red, local minima in blue, highlighting primes in green, and other prime powers in gold.
%H A358488 Rémy Sigrist, <a href="/A358488/a358488.gp.txt">PARI program</a>
%e A358488 gcd(a(1),a(2)) = 1, so  a(3) = 4, the least novel m prime to 1 but not to 2.
%e A358488 2, 4 have common divisor 2 so a(4) = 3, the least novel m prime to 1 but not to 2 + 4 = 6.
%e A358488 Since 4 and 3 are coprime, a(5) = 9, the least novel m prime to 4 but not to 3.
%e A358488 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.
%t A358488 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 *)
%o A358488 (PARI) \\ See Links section.
%Y A358488 Cf. A007947, A098550, A358534.
%K A358488 nonn
%O A358488 1,2
%A A358488 _David James Sycamore_ and _Michael De Vlieger_, Nov 18 2022