login
A351495
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).
23
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, 36, 35, 34, 39, 38, 42, 40, 45, 44, 48, 50, 51, 46, 54, 55, 52, 57, 56, 60, 49, 58, 63, 62, 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
OFFSET
1,2
COMMENTS
The sequence is conjectured to be a permutation of the positive integers.
The k-th prime appears as the next term after A002110(k-1) appears.
LINKS
Michael De Vlieger, Log-log scatterplot of a(n), 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.
Scott R. Shannon, Image of the first 50000 terms. The green line is y = n.
EXAMPLE
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.
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.
MATHEMATICA
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 *)
PROG
(Python)
from itertools import count, islice
from sympy import prime, primepi, primefactors
def A351495_gen(): # generator of terms
aset, cset = set(), {1}
yield 1
while True:
for i in count(1):
if not i in aset:
p = prime(i)
for j in count(1):
if (m:=j*p) not in cset:
yield m
cset.add(m)
break
break
aset = set(map(primepi, primefactors(m)))
A351495_list = list(islice(A351495_gen(), 30)) # Chai Wah Wu, Mar 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, May 03 2022
STATUS
approved