OFFSET
1,2
COMMENTS
It follows from the definition that the sequence is infinite, and that the records (outside of the first 7 terms) are all primorial numbers, meaning that it grows very quickly.
When there are no primes less than the greatest prime factor of a(n-1) which do not divide a(n-1) then m is the least novel multiple of 1, the empty product, and therefore a(n) = u, the least unused number in the sequence so far. The only way a prime can enter the sequence is as u. When a(n-1) = prime(k), a(n) is A002110(k-1), and any primorial term is followed by u. Thus: prime —> primorial —> u.
Sequence is a permutation of the positive integers since by the definition no number appears more than once and m = 1 eventually introduces any number not already placed by the first part of the definition (m > 1).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..4992
Michael De Vlieger, Log log scatterplot of log_10(a(n)), n = 1..2^16.
Michael De Vlieger, Plot p^e | a(n) at (x,y) = (n, pi(p)) for n = 1..2^11, with a color function representing e = 1 as black, e = 2 as red, ..., the maximum value of e in the dataset as magenta. Under the plot, we indicate the empty product in black, primes in red, composite prime powers in gold, squarefree composites in green, and all other numbers in blue.
EXAMPLE
a(1) = 1 and there are no primes < 1 which divide 1 therefore m = 1 so a(2) = 2, the least unused number. Likewise a(3) = 3.
a(4) = 2*2 = 4 since 2 is the only prime < 3 which does not divide 3 and 2 has already occurred.
Since a(7) = 7, a(8) = 2*3*5 = 30.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 1; a[1] = j = 1; c[1] = True;
Do[k = Times @@ Complement[Prime@ Range[PrimePi@ Last[#] - 1], #] &[
FactorInteger[j][[All, 1]] ];
While[c[k m[k]], m[k]++]; k *= m[k];
Set[{a[n], c[k], j}, {k, True, k}], {n, 2, nn}];
Array[a, nn]
PROG
(PARI) lista(nn) = my(c, m, v=List([1, 2])); for(k=3, nn, c=m=1; forprime(p=2, vecmax(factor(v[k-1])[, 1]), if(v[k-1]%p, m*=p)); while(setsearch(Set(v), c*m), c++); listput(v, c*m)); Vec(v) \\ Jinyuan Wang, Jul 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 11 2023
EXTENSIONS
More terms from Jinyuan Wang, Jul 11 2023
STATUS
approved