A373698 a(n) = n for n <= 3; for n > 3, a(n) is the smallest unused positive number that shares a factor with the largest odd divisor of a(n-1).
1, 2, 3, 6, 9, 12, 15, 5, 10, 20, 25, 30, 18, 21, 7, 14, 28, 35, 40, 45, 24, 27, 33, 11, 22, 44, 55, 50, 60, 36, 39, 13, 26, 52, 65, 70, 42, 48, 51, 17, 34, 68, 85, 75, 54, 57, 19, 38, 76, 95, 80, 90, 63, 49, 56, 77, 66, 69, 23, 46, 92, 115, 100, 105, 72, 78, 81, 84, 87, 29, 58, 116, 145, 110
Offset: 1
Keywords
Examples
a(11) = 25 as a(10) = 20 which has a largest odd divisor of 5, and 25 is the smallest unused positive number that shares a factor with 5.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing primes in red, perfect powers of primes in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, where the latter additionally represents powerful numbers that are not prime powers.
- Scott R. Shannon, Image of the first 100000 terms. Numbers with one, two, three, four, or five and more prime factors, counted with multiplicity, are shown as red, yellow, green, blue and violet respectively. The white line is a(n) = n.
- Scott R. Shannon, Image of the first 100000 terms. The even terms are shown in yellow, the odd terms in green.
Programs
-
Mathematica
j = 3; nn = 120; c[] := False; m[] := 1; Array[Set[{a[#], c[#]}, {#, True}] &, j]; u = j + 1; Do[If[PrimePowerQ[j], (k = m[#]; While[c[k #], k++]; k *= #; While[c[# m[#]], m[#]++]) &@ FactorInteger[j][[1, 1]], k = u; While[Or[c[k], CoprimeQ[j, k]], k++] ]; Set[{a[n], c[k], j}, {#, True, #/2^IntegerExponent[#, 2]}] &[k], {n, j + 1, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 20 2024 *)
Comments