A372975 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) while omega(a(n)) does not equal omega(a(n-1)).
1, 2, 6, 3, 12, 4, 10, 5, 15, 9, 18, 8, 14, 7, 21, 27, 24, 16, 20, 25, 30, 22, 11, 33, 42, 26, 13, 39, 60, 28, 32, 34, 17, 51, 66, 36, 64, 38, 19, 57, 78, 40, 70, 35, 49, 56, 84, 44, 90, 45, 81, 48, 102, 46, 23, 69, 105, 50, 110, 52, 114, 54, 120, 55, 121, 77, 126, 58, 29, 87, 132, 62, 31, 93, 138
Offset: 1
Keywords
Examples
a(3) = 6 as a(2) = 2 and omega(2) = A001221(2) = 1, and 6 shares a factor with 2 while omega(6) = A001221(6) = 2 which does not equal 1.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..10000
- Scott R. Shannon, Image of the first 5000 terms. The green line is a(n) = n.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, showing primes in red, perfect prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, where purple represents powerful numbers that are not prime powers.
Programs
-
Mathematica
nn = 1000; c[] := False; m[] := 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = 2; v = 4; Do[Which[ And[PrimeQ[#], OddQ[#]] &[j/2], k = j/2, PrimePowerQ[j], k = FactorInteger[j][[1, 1]]; While[Or[c[#], PrimePowerQ[#]] &[k*m[k]], m[k]++]; k *= m[k], True, k = v; While[Or[CoprimeQ[j, k], PrimeNu[k] == #, c[k]] &[PrimeNu[j]], k++]]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == v, While[Or[PrimeQ[v], c[v]], v++]], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, May 28 2024 *)
Comments