OFFSET
1,3
COMMENTS
Values of n that are squares of primes p^2 seem to reduce the value of a(p^2) from the value a(p^2 - 1). Example, a(24) = 13, a(25) = 9; a(120) = 70, a(121) = 60.
a(p^2) = a(p^2-1) - p + 1 if p is prime. If n is not the square of a prime, a(n) >= a(n-1).- Robert Israel, Aug 11 2014
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..5000
E. Naslund, The Average Largest Prime Factor, Integers, Vol. 13 (2013), A81. See "2. The Main Theorem."
FORMULA
a(n) = Sum_{prime p > sqrt(n)} floor(n/p). - Max Alekseyev, Nov 14 2017
EXAMPLE
a(12) = 4, because there are four values of m = {5, 7, 10, 11} that have prime divisors that exceed sqrt(12) = 3.464... These prime divisors are {5, 7, 5, 11} respectively.
MAPLE
N:= 1000: # to get a(1) to a(N)
MF:= map(m -> max(numtheory:-factorset(m))^2, <($1..N)>): MF[1]:= 0:
seq(nops(select(m -> MF[m]>n, [$1..n])), n=1..N); # Robert Israel, Aug 11 2014
MATHEMATICA
a241419[n_Integer] :=
Module[{f},
f = Reap[For[m = 1, m <= n, m++,
If[Max[First[Transpose[FactorInteger[m]]]] > Sqrt[n], Sow[m],
False]]];
If[Length[f[[2]]] == 0, Length[f[[2]]], Length[f[[2, 1]]]]]; a241419[120]
PROG
(PARI) isok(i, n) = {my(f = factor(i)); my(sqrn = sqrt(n)); for (k=1, #f~, if ((p=f[k, 1]) && (p>sqrn) , return (1)); ); }
a(n) = sum(i=1, n, isok(i, n)); \\ Michel Marcus, Aug 11 2014
(PARI) A241419(n) = my(r=0); forprime(p=sqrtint(n)+1, n, r+=n\p); r; \\ Max Alekseyev, Nov 14 2017
(Python)
from math import isqrt
from sympy import primerange
def A241419(n): return int(sum(n//p for p in primerange(isqrt(n)+1, n+1))) # Chai Wah Wu, Oct 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Aug 08 2014
STATUS
approved