A366385 Divide n by its largest prime factor, then multiply with the index of that same prime; a(1) = 0 by convention.
0, 1, 2, 2, 3, 4, 4, 4, 6, 6, 5, 8, 6, 8, 9, 8, 7, 12, 8, 12, 12, 10, 9, 16, 15, 12, 18, 16, 10, 18, 11, 16, 15, 14, 20, 24, 12, 16, 18, 24, 13, 24, 14, 20, 27, 18, 15, 32, 28, 30, 21, 24, 16, 36, 25, 32, 24, 20, 17, 36, 18, 22, 36, 32, 30, 30, 19, 28, 27, 40, 20, 48, 21, 24, 45, 32, 35, 36, 22, 48, 54, 26, 23, 48, 35
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
Array[PrimePi[#2]*#1/#2 & @@ {#, FactorInteger[#][[-1, 1]]} &, 85] (* Michael De Vlieger, Oct 23 2023 *)
-
PARI
A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]); A366385(n) = { my(gpf=A006530(n)); primepi(gpf)*(n/gpf); };