login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352928 The smallest unused number when A093714(n) is being calculated. 4
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, 24, 24, 24, 28, 28, 28, 28, 30, 30, 30, 30, 34, 34, 36, 36, 36, 36, 40, 40, 42, 42, 42, 42, 42, 42, 48, 48, 50, 50, 54, 54, 54, 54, 58, 58, 60, 60, 60, 60, 64, 64, 66, 66, 66, 66, 70, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
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 *)
PROG
(Python)
from math import gcd
from itertools import islice
def agen(): # generator of terms
an, aset, mink = 1, {1}, 2
yield 1
while True:
yield mink
k = mink
while k in aset or gcd(an, k) != 1 or k-an == 1: k += 1
an = k
aset.add(an)
while mink in aset: mink += 1
print(list(islice(agen(), 72))) # Michael S. Branicky, May 02 2022
CROSSREFS
Cf. A093714.
Sequence in context: A116568 A239933 A061106 * A319399 A352434 A161764
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 02 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 3 11:59 EDT 2024. Contains 374892 sequences. (Running on oeis4.)