OFFSET
1,2
COMMENTS
Variant of A358971 that additionally requires either k | n or n | k. This version eliminates nondivisor n and a(n) seen in a scatterplot of A358971. First differs from A358971 at n = 18.
Some consequences of definition:
There are no fixed points outside of a(1) = 1.
Prime power p^e implies a(p^e) = p^(e+1) for odd e, else p^(e-1). Hence a(p) = p^2 comprise maxima, while a(p^2) = p comprise minima.
Let lpf(m) = least prime factor of m. Squarefree m implies a(m) = lpf(m)*m and a(lpf(m)*m) = m, as seen in scatterplot in rays with slope p and 1/p, respectively. Therefore squarefree numbers are sequestered along or below a(n/2) = n/2.
LINKS
Michael De Vlieger, Log log scatterplot of a(n) n = 1..2^20.
Michael De Vlieger, Log log scatterplot of a(n) n = 1..2^10, showing primes in red, composite prime powers (in A246547) in gold, squarefree composites (in A120944) in green, numbers neither squarefree nor prime power (in A126706) in blue, highlighting numbers in A286708 in large light blue. Gold and light blue numbers are in A001694. Maxima are a(p) = p^2, minima are a(p^2) = p.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, showing n | a(n) in green, a(n) | n in red.
MATHEMATICA
nn = 61; c[_] = False; q[_] = 1; f[n_] := f[n] = Times @@ FactorInteger[n][[All, 1]]; a[1] = 1; c[1] = True; Do[Which[PrimePowerQ[n], k = If[OddQ[#2], #1^(#2 + 1), #1^(#2 - 1)] & @@ First@ FactorInteger[n], PrimeQ@ Sqrt[n], k = Sqrt[n], True, k = f[n]; m = q[k]; While[Nand[! c[k m], Or[Divisible[k m, n], Divisible[n, k m]], k m != n, Divisible[k, f[m]]], m++]; While[Nor[c[q[k] k], Divisible[k, f[q[k]]]], q[k]++]; k *= m]; Set[{a[n], c[k]}, {k, True}], {n, 2, nn}]; Array[a, nn]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Dec 08 2022
STATUS
approved