cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A241419 Number of numbers m <= n that have a prime divisor greater than sqrt(n) (i.e., A006530(m)>sqrt(n)).

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 4, 4, 2, 3, 4, 4, 5, 6, 7, 7, 8, 8, 9, 10, 11, 12, 13, 13, 9, 10, 10, 11, 12, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 22, 23, 23, 24, 25, 25, 19, 19, 20, 21, 22, 22, 23, 23, 24, 25, 26, 26, 27, 28, 28, 28, 29, 30, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38
Offset: 1

Views

Author

Michael De Vlieger, Aug 08 2014

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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]
  • 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

Formula

a(n) = Sum_{prime p > sqrt(n)} floor(n/p). - Max Alekseyev, Nov 14 2017