login
A357942
a(1)=1, a(2)=2. Thereafter, if there are prime divisors p | a(n-1) that are coprime to a(n-2), a(n) is the least novel multiple of the product of these primes. Otherwise a(n) is the least novel multiple of the squarefree kernel of a(n-1). See comments.
1
1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 18, 14, 7, 21, 24, 16, 20, 25, 30, 36, 42, 28, 56, 70, 35, 105, 27, 33, 11, 22, 26, 13, 39, 45, 40, 32, 34, 17, 51, 48, 38, 19, 57, 54, 44, 55, 50, 46, 23, 69, 60, 80, 90, 63, 49, 77, 66, 72, 78, 52, 104, 130, 65, 195, 75, 120
OFFSET
1,2
COMMENTS
Let k be the greatest common squarefree divisor of a(n-2) and a(n-1) and let s = A007947(a(n-1)). If k = 1, then a(n) = m_s*s, else a(n) = m_k*k, where m_i is the smallest multiple of i such that m*i does not appear in a(1..n-1).
Variant of A357963; a(21) = 36, but A357963(21) = 22.
LINKS
Michael De Vlieger, Scatterplot of a(n), n = 1..2^20.
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^14, showing records in red, local minima in blue, highlighting primes in green and other prime powers in gold.
EXAMPLE
a(1) = 1, a(2) = 2 and 2 divides 2 but does not divide 1. Since 2 is the only prime divisor of 2, a(3) = 4, the smallest unused multiple of 2.
Since every prime divisor of a(3)=4 also divides a(2) = 2, a(4) = 6, the least novel multiple of the squarefree kernel of 4.
a(19,20) = (25,30); 2|30 and 3|30 but 2 and 3 do not divide 25. The smallest multiple of 2*3 = 6 not already in the sequence is 36. Therefore a(21) = 36.
MATHEMATICA
nn = 67; c[_] = False; q[_] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; q[2] = 2; Do[m = FactorInteger[a[n - 1]][[All, 1]]; If[Length@ # == 0, While[Set[k, #* q[#]]; c[k], q[#]++] &[Times @@ m], While[Set[k, #* q[#]]; c[k], q[#]++] &[Times @@ #]] &@ Select[m, CoprimeQ[#, a[n - 2]] &]; Set[{a[n], c[k]}, {k, True}], {n, 3, nn}]; Array[a, nn]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Oct 22 2022
STATUS
approved