A334572 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)).
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, 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, 1, 1, 3, 3, 1, 2, 2, 2, 1, 1, 4, 4, 4, 1, 2, 2, 1, 1, 3, 3, 2
Offset: 2
Keywords
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 2..10000
- 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.
Programs
-
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 *)
-
PARI
a(n) = {my(f=factor(n/(n-1))[,2]~); vecmax(apply(x->abs(x), f));}
-
PARI
A051903(n)=vecmax(factor(n)[, 2]) a(n)=if(n<4, return(1)); max(A051903(n-1),A051903(n)) \\ Charles R Greathouse IV, Jan 30 2022
Formula
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=2..m} a(k) = 2.2883695... (A334574). - Amiram Eldar, Jan 05 2024
Comments