Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #39 Aug 27 2023 11:09:32
%S 1,2,3,4,6,5,8,9,10,12,15,14,18,20,21,16,24,25,22,27,26,30,7,28,33,32,
%T 36,35,34,39,38,42,40,45,44,48,50,51,46,54,55,52,57,56,60,49,58,63,62,
%U 66,65,64,69,68,72,70,75,74,78,80,81,76,84,85,82,87,86,90,77,88,93,92,96,95,94
%N a(1) = 1, for n > 1, a(n) is the smallest positive number that has not yet appeared that is a multiple of the smallest prime that does not divide a(n-1).
%C The sequence is conjectured to be a permutation of the positive integers.
%C The k-th prime appears as the next term after A002110(k-1) appears.
%H Michael De Vlieger, <a href="/A351495/b351495.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A351495/a351495_1.png">Log-log scatterplot of a(n)</a>, n = 1..2^16, showing m with lpf(m) = 7 in red, lpf(m) = 11 in gold, lpf(m) = 13 in green, and lpf(m) = 17 in blue.
%H Scott R. Shannon, <a href="/A351495/a351495.png">Image of the first 50000 terms</a>. The green line is y = n.
%e a(5) = 6 as a(4) = 2 = 2*2 which does not contain 3 as a prime factor, and 6 is the smallest unused number that is a multiple of 3.
%e a(6) = 5 as a(5) = 6 = 2*3 which does not contain 5 as a prime factor, and 5 is the smallest unused number that is a multiple of 5.
%t nn = 75; c[_] = 0; a[1] = c[1] = 1; u = 2; Do[q = 2; While[! CoprimeQ[q, a[i - 1]], Set[q, NextPrime[q]]]; m = Ceiling[u/q]; While[c[m*q] != 0, m++]; Set[{a[i], c[m*q]}, {m*q, i}]; If[m*q == u, While[c[u] > 0, u++]], {i, 2, nn}]; Array[a, nn] (* _Michael De Vlieger_, May 03 2022 *)
%o (Python)
%o from itertools import count, islice
%o from sympy import prime, primepi, primefactors
%o def A351495_gen(): # generator of terms
%o aset, cset = set(), {1}
%o yield 1
%o while True:
%o for i in count(1):
%o if not i in aset:
%o p = prime(i)
%o for j in count(1):
%o if (m:=j*p) not in cset:
%o yield m
%o cset.add(m)
%o break
%o break
%o aset = set(map(primepi,primefactors(m)))
%o A351495_list = list(islice(A351495_gen(),30)) # _Chai Wah Wu_, Mar 18 2023
%Y Cf. A353026, A352793, A002110, A000040, A064413, A352588, A359804,
%Y See also A361330, A361331.
%K nonn
%O 1,2
%A _Scott R. Shannon_, May 03 2022