OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..256, showing a(n) mod 6 = 3 in red, a(n) mod 6 = 2 in large dark blue, and a(n) mod 6 = 4 in green dots. Demonstrates 2 trajectories, an early trajectory pertaining to 3 (mod 6) and a late trajectory pertaining to +-2 (mod 6).
Michael De Vlieger, 32 X 32 table of a(n), n = 1..1024, listed in rows, with a color code according to residue (mod 6). Blue = 2 (mod 6), red = 3 (mod 6), light green = 4 (mod 6), black = 0, 1, or 5 mod 6.
Michael De Vlieger, 30 X 30 table of a(n), n = 1..900, listed in rows, with a color code as follows: black = empty product, red = prime, gold = composite prime power, light green = squarefree semiprime, green = squarefree number with more than 2 prime factors, purple = powerful number (in A001694) that is not a prime power, blue = other numbers that are neither squarefree nor prime powers.
Michael De Vlieger, 210 X 210 table of a(n), n = 1..44100, listed in rows with color code as immediately above, demonstrating the aggregate pattern demonstrated in the sequence. Certain residues (mod 210) seem to be devoid of squarefree numbers, perhaps since they are a product 9*m.
FORMULA
From Michael De Vlieger, Aug 22 2023: (Start)
a(2n) == +-2 (mod 6).
a(2n+1) == 3 (mod 6), n > 0. (End)
EXAMPLE
a(2) = 2 because 2 is the smallest prime which does not divide 1, and 2 is prime to 1.
3(3) = 3 because 3 is the smallest prime which does not divide 2, and 3 is prime to 2.
a(4) = 4 since it is the second multiple of 2, the smallest prime that does not divide 3, and 4 is prime to 3.
a(5) = 9 since it is the least novel multiple of 3, the smallest prime that does not divide 4, and is the least such number prime to 4.
MATHEMATICA
nn = 12; m[_] := 1; a[1] = j = 1; m[1] = 2; c[1] = True; c[_] := False; f[x_] := Block[{q}, q = 2; While[! CoprimeQ[q, x], q = NextPrime[q]]; q]; Do[{k = m[#]; While[Or[! CoprimeQ[j, k], c[# k]], k++]; If[k == m[#], While[c[m[#] #], m[#]++]]; Set[{a[n], j, c[k #]}, {k #, k #, True}]} &@ f[j], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Aug 22 2023 *)
PROG
(PARI) first(n) = {my(res = vector(n)); sofar = Set([1..4]); for(i = 1, 4, res[i] = i); for(i = 5, n, res[i] = nxt(res[i-1])); res}
nxt(n) = {my(start, step); if(n % 2 == 0, start = 3; step = 6, start = 2; step = [2, 4]); forstep(i = start, oo, step, s = Set(i); if(gcd(i, n) == 1 && #setminus(s, sofar) == 1, sofar = setunion(sofar, s); return(i)))} \\ David A. Corneth, Aug 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Aug 22 2023
EXTENSIONS
More terms from David A. Corneth, Aug 22 2023
STATUS
approved