OFFSET
2,3
COMMENTS
a(n) = d_infinite(n, n-1) as defined in Kolossváry & Kolossváry link.
LINKS
István B. Kolossváry and István T. Kolossváry, Distance between natural numbers based on their prime signature, Journal of Number Theory, Vol. 234 (2022), pp. 120-139; arXiv preprint, arXiv:2005.02027 [math.NT], 2020-2021.
Wikipedia, Chebyshev distance.
FORMULA
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=2..m} a(k) = 2.2883695... (A334574). - Amiram Eldar, Jan 05 2024
EXAMPLE
The "coordinates" of the prime factorization are
0,0,0,0, ... for n=1,
1,0,0,0, ... for n=2,
0,1,0,0, ... for n=3,
2,0,0,0, ... for n=4,
0,0,1,0, ... for n=5,
1,1,0,0, ... for n=6;
so the absolute differences are
1,0,0,0, ... so a(2)=1,
1,1,0,0, ... so a(3)=1,
2,1,0,0, ... so a(4)=2,
2,0,1,0, ... so a(5)=2,
1,1,1,0, ... so a(6)=1.
MAPLE
f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
a:= n-> max(map(abs, {coeffs(f(n)-f(n-1))})):
seq(a(n), n=2..120); # Alois P. Heinz, May 06 2020
MATHEMATICA
Block[{f}, f[n_] := If[n == 1, {0}, Function[g, ReplacePart[Table[0, {PrimePi[g[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, g]]@ FactorInteger@ n]; Array[Function[{a, b, m}, Max@ Abs[Subtract @@ #] &@ Map[PadRight[#, m] &, {a, b}]] @@ {#1, #2, Max@ Map[Length, {#1, #2}]} & @@ {f[# - 1], f@ #} &, 106, 2]] (* Michael De Vlieger, May 06 2020 *)
(* Second program: *)
f[n_] := Sum[{p, e} = pe; e x^p, {pe, FactorInteger[n]}];
a[n_] := CoefficientList[f[n]-f[n-1], x] // Abs // Max;
a /@ Range[2, 90] (* Jean-François Alcover, Nov 16 2020, after Alois P. Heinz *)
Max @@@ Partition[Join[{0}, Table[Max[FactorInteger[n][[;; , 2]]], {n, 2, 100}]], 2, 1] (* Amiram Eldar, Jan 05 2024 *)
PROG
(PARI) a(n) = {my(f=factor(n/(n-1))[, 2]~); vecmax(apply(x->abs(x), f)); }
(PARI) A051903(n)=vecmax(factor(n)[, 2])
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, May 06 2020
STATUS
approved