%I #34 Jan 05 2024 02:52:47
%S 1,1,2,2,1,1,3,3,2,1,2,2,1,1,4,4,2,2,2,2,1,1,3,3,2,3,3,2,1,1,5,5,1,1,
%T 2,2,1,1,3,3,1,1,2,2,2,1,4,4,2,2,2,2,3,3,3,3,1,1,2,2,1,2,6,6,1,1,2,2,
%U 1,1,3,3,1,2,2,2,1,1,4,4,4,1,2,2,1,1,3,3,2
%N Let x(n, k) be the exponent of prime(k) in the factorization of n, then a(n) = Max_{k} abs(x(n,k)- x(n-1,k)).
%C a(n) = d_infinite(n, n-1) as defined in Kolossváry & Kolossváry link.
%H István B. Kolossváry and István T. Kolossváry, <a href="https://doi.org/10.1016/j.jnt.2021.09.010">Distance between natural numbers based on their prime signature</a>, Journal of Number Theory, Vol. 234 (2022), pp. 120-139; <a href="https://arxiv.org/abs/2005.02027">arXiv preprint</a>, arXiv:2005.02027 [math.NT], 2020-2021.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Chebyshev_distance">Chebyshev distance</a>.
%F a(n) = max(A051903(n-1), A051903(n)). - _Pontus von Brömssen_, May 07 2020
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=2..m} a(k) = 2.2883695... (A334574). - _Amiram Eldar_, Jan 05 2024
%e The "coordinates" of the prime factorization are
%e 0,0,0,0, ... for n=1,
%e 1,0,0,0, ... for n=2,
%e 0,1,0,0, ... for n=3,
%e 2,0,0,0, ... for n=4,
%e 0,0,1,0, ... for n=5,
%e 1,1,0,0, ... for n=6;
%e so the absolute differences are
%e 1,0,0,0, ... so a(2)=1,
%e 1,1,0,0, ... so a(3)=1,
%e 2,1,0,0, ... so a(4)=2,
%e 2,0,1,0, ... so a(5)=2,
%e 1,1,1,0, ... so a(6)=1.
%p f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
%p a:= n-> max(map(abs, {coeffs(f(n)-f(n-1))})):
%p seq(a(n), n=2..120); # _Alois P. Heinz_, May 06 2020
%t 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 *)
%t (* Second program: *)
%t f[n_] := Sum[{p, e} = pe; e x^p, {pe, FactorInteger[n]}];
%t a[n_] := CoefficientList[f[n]-f[n-1], x] // Abs // Max;
%t a /@ Range[2, 90] (* _Jean-François Alcover_, Nov 16 2020, after _Alois P. Heinz_ *)
%t Max @@@ Partition[Join[{0}, Table[Max[FactorInteger[n][[;; , 2]]], {n, 2, 100}]], 2, 1] (* _Amiram Eldar_, Jan 05 2024 *)
%o (PARI) a(n) = {my(f=factor(n/(n-1))[,2]~); vecmax(apply(x->abs(x), f));}
%o (PARI) A051903(n)=vecmax(factor(n)[, 2])
%o a(n)=if(n<4, return(1)); max(A051903(n-1),A051903(n)) \\ _Charles R Greathouse IV_, Jan 30 2022
%Y Cf. A051903, A067255, A124010, A334573 (partial sums), A334574.
%K nonn
%O 2,3
%A _Michel Marcus_, May 06 2020