OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..6626 (terms n = 1..899 from Michael De Vlieger)
Michael De Vlieger, Log-log scatterplot of A347113(n) for 1 <= n <= 2^12, showing terms in A347307 in red, those in A347755 joined in gold, and terms in this sequence in blue.
MATHEMATICA
Block[{nn = 2^13, a = {1}, c, k, m, u = 2, v}, v = a; Map[Set[c[#], 1] &, Union@ a]; Do[Set[k, u]; If[PrimeQ[#], m = 2; While[IntegerQ[c[m #]], m++]; k = m #, While[Or[IntegerQ[c[k]], k == #, GCD[k, #] == 1], k++]] &[a[[-1]] + 1]; AppendTo[a, k]; Set[c[k], 1]; AppendTo[v, u]; If[k == u, While[IntegerQ[c[u]], u++]], nn]; Union@ v]
(* or using A347113 bfile: *)
Block[{a, u = {1}, v = 1}, a = Import["https://oeis.org/A347113/b347113.txt", "Data"][[All, -1]]; Do[If[a[[i]] == v, While[! FreeQ[a[[1 ;; i]], v], v++]]; AppendTo[u, v], {i, Length[a]}]; Union@ u]
PROG
(Python)
from math import gcd
A347756_list, nset, m, j = [1], {1}, 2, 2
for _ in range(10**4):
k = m
while k == j or gcd(k, j) == 1 or k in nset:
k += 1
j = k + 1
nset.add(k)
if k == m:
A347756_list.append(k)
while m in nset:
m += 1 # Chai Wah Wu, Sep 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Sep 12 2021
STATUS
approved