A358267 a(1) = 1, a(2) = 2. Thereafter:(i). If no prime divisor of a(n-1) divides a(n-2), a(n) is the least novel multiple of the squarefree kernel of a(n-1). (ii). If some (but not all) prime divisors of a(n-1) do not divide a(n-2), a(n) is the least of the least novel multiples of all such primes. (iii). If every prime divisor of a(n-1) also divides a(n-2), a(n) = u, the least unused number.
1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 14, 16, 11, 22, 18, 15, 20, 24, 21, 28, 26, 13, 17, 34, 30, 25, 19, 38, 32, 23, 46, 36, 27, 29, 58, 40, 35, 42, 33, 44, 48, 39, 52, 50, 45, 51, 68, 54, 57, 76, 56, 49, 31, 62, 60, 55, 66, 63, 70, 64, 37, 74, 72, 69, 92, 78, 65
Offset: 1
Keywords
Examples
a(1) = 1, a(2) = 2 and since 2|a(2) but not a(1), and no other primes are involved, a(3) = 4, the least novel multiple of 2, the squarefree kernel of 2 (by (i)). Every prime divisor of a(3) = 4 also divides a(2) = 2, thus a(4) = 3, the least unused number (by (iii)). a(23) = 13 because 13|a(22) = 26, but does not divide a(21) = 28 (by (ii)). Then since every prime divisor of a(23) also divides a(22), a(24) = 17, the least unused term (by (iii)). This is the first occasion of consecutive primes. a(25) = 34, a(26) = 30 and there are two primes (3,5) which divide 30 but not 34. At this point the least novel multiples of 3 and 5 are 27 and 25 respectively, so a(27) = 25 (by (ii)). This is the first departure from A280864/A280866, which both have a(27) = 45.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Scatterplot of a(n), n = 1..2^20
- Michael De Vlieger, Annotated scatterplot of a(n) n = 1..200, showing primes p in red, 2p in light blue, 3p in green, and 4p in dark blue.
- Michael De Vlieger, Log-log scatterplot of a(n) n = 1..2^14, showing maxima in red, local minima in blue, highlighting primes p in green and other prime powers in gold.
Programs
-
Mathematica
Block[{a, c, f, g, k, m, q, u, nn}, nn = 120; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 3]; q[2] = 2; u = 3; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; If[AllTrue[m, Mod[a[n - 2], #] == 0 &], k = u, Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Nov 06 2022 *)
Extensions
More terms from Michael De Vlieger, Nov 06 2022
Comments