OFFSET
1,6
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Least Prime Factor.
FORMULA
a(n) = |{j < n : lpf(j) = lpf(n)}|.
a(n) = A078898(n) - 1.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Nov 21 2024
MATHEMATICA
Table[Length[Select[Range[n - 1], If[# == 1, 1, FactorInteger[#][[1, 1]]] == If[n == 1, 1, FactorInteger[n][[1, 1]]] &]], {n, 80}]
seq[len_] := Module[{t = Table[FactorInteger[n][[1, 1]], {n, 1, len}], s = Table[0, {len}]}, Do[s[[i]] = Count[t[[1;; i-1]], t[[i]]], {i, 1, len}]; s]; seq[80] (* Amiram Eldar, Nov 21 2024 *)
PROG
(PARI) a(n) = if (n>1, my(p=vecmin(factor(n)[, 1])); sum(k=2, n-1, p == vecmin(factor(k)[, 1])), 0); \\ Michel Marcus, Nov 16 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Ilya Gutkovskiy, Nov 05 2024
STATUS
approved