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.

A352928 The smallest unused number when A093714(n) is being calculated.

This page as a plain text file.
%I A352928 #13 May 05 2022 14:14:57
%S A352928 1,2,2,4,4,6,6,8,8,9,9,10,10,10,12,12,15,15,16,16,16,18,18,20,20,24,
%T A352928 24,24,24,28,28,28,28,30,30,30,30,34,34,36,36,36,36,40,40,42,42,42,42,
%U A352928 42,42,48,48,50,50,54,54,54,54,58,58,60,60,60,60,64,64,66,66,66,66,70,70
%N A352928 The smallest unused number when A093714(n) is being calculated.
%H A352928 Michael De Vlieger, <a href="/A352928/b352928.txt">Table of n, a(n) for n = 1..10000</a>
%t A352928 nn = 120; c[_] = 0; a[1] = c[1] = 1; u = 2; {1}~Join~Reap[Do[k = u; While[Nand[c[k] == 0, CoprimeQ[#, k], k != # + 1], k++] &@ a[i - 1]; Set[{a[i], c[k]}, {k, i}]; If[a[i] == u, While[c[u] > 0, u++]], {i, 2, nn}]][[-1, -1]] (* _Michael De Vlieger_, May 02 2022 *)
%o A352928 (Python)
%o A352928 from math import gcd
%o A352928 from itertools import islice
%o A352928 def agen(): # generator of terms
%o A352928     an, aset, mink = 1, {1}, 2
%o A352928     yield 1
%o A352928     while True:
%o A352928         yield mink
%o A352928         k = mink
%o A352928         while k in aset or gcd(an, k) != 1 or k-an == 1: k += 1
%o A352928         an = k
%o A352928         aset.add(an)
%o A352928         while mink in aset: mink += 1
%o A352928 print(list(islice(agen(), 72))) # _Michael S. Branicky_, May 02 2022
%Y A352928 Cf. A093714.
%K A352928 nonn
%O A352928 1,2
%A A352928 _N. J. A. Sloane_, May 02 2022