A366387 Divide n by its smallest prime factor, then multiply with the index of that same prime; a(1) = 0 by convention.
0, 1, 2, 2, 3, 3, 4, 4, 6, 5, 5, 6, 6, 7, 10, 8, 7, 9, 8, 10, 14, 11, 9, 12, 15, 13, 18, 14, 10, 15, 11, 16, 22, 17, 21, 18, 12, 19, 26, 20, 13, 21, 14, 22, 30, 23, 15, 24, 28, 25, 34, 26, 16, 27, 33, 28, 38, 29, 17, 30, 18, 31, 42, 32, 39, 33, 19, 34, 46, 35, 20, 36, 21, 37, 50, 38, 44, 39, 22, 40, 54, 41, 23, 42, 51
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
Array[PrimePi[#2]*#1/#2 & @@ {#, FactorInteger[#][[1, 1]]} &, 85] (* Michael De Vlieger, Oct 23 2023 *)
-
PARI
A020639(n) = if(1==n,n,vecmin(factor(n)[, 1])); A366387(n) = { my(spf=A020639(n)); primepi(spf)*(n/spf); };