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.

Showing 1-3 of 3 results.

A281889 a(n) is the least integer k such that more than half of all integers are divisible by a product of n integers chosen from 2..k.

Original entry on oeis.org

3, 7, 433, 9257821
Offset: 1

Views

Author

Peter Munn, Feb 01 2017

Keywords

Comments

The n chosen integers need not be distinct.
By "more than half of all integers" we mean more precisely "more than half of the integers in -m..m, for all sufficiently large m (depending on n)", and similarly with 1..m for "more than half of all positive integers".
Equivalently, a(n) is the least prime p such that more than half of all positive integers can be written as a product of primes of which n or more are not greater than p. (In this sense, a(n) might be called the median n-th least prime factor of the integers.)
The number of integers that satisfy the "product of primes" criterion for p = prime(m) is the same in every interval of primorial(m)^n integers and is A281891(m,n). Primorial(m) = A002110(m), product of the first m primes.
a(n) is the least k = prime(m) such that 2 * A281891(m,n) > A002110(m)^n.
a(n) is the least k such that more than half of all positive integers equate to the volume of an orthotope with integral sides at least n of which are orthogonal with length between 2 and k inclusive.
The next term is estimated to be a(5) ~ 3*10^18.

Examples

			For n=1, we have a(1) = 3 since for all m > 1, more than half of the integers in -m..m are divisible by an integer chosen from 2..3, i.e., either 2 or 3. We must have a(1) > 2, because the only integer in 2..2 is 2, but in each interval -2m-1..2m+1, only 2m+1 integers are even, so 2 is not a divisor of more than half of all integers in the precise sense given above.
		

Crossrefs

Other sequences about medians of prime factors: A126282, A126283, A284411, A290154.

A126283 Largest number k for which the n-th prime is the median of the largest prime dividing the first k integers.

Original entry on oeis.org

4, 18, 40, 76, 116, 182, 246, 330, 426, 532, 652, 770, 904, 1058, 1210, 1386, 1560, 1752, 1956, 2162, 2394, 2640, 2894, 3150, 3422, 3680, 3984, 4302, 4628, 4974, 5294, 5650, 5914, 6006, 6372, 6746, 7146, 7536, 7938, 8386, 8794, 9222, 9702, 10156
Offset: 1

Views

Author

Mark Thornquist (mthornqu(AT)fhcrc.org) & Robert G. Wilson v, Dec 15 2006

Keywords

Comments

a(14) = 1058 is the first term where a(n) exceeds A290154(n). - Peter Munn, Aug 02 2019

Examples

			a(1)=4 because the median of {2,3,2} = {2, *2*,3} is 2 (the * surrounds the median) and for any number greater than 4 the median is greater than 2.
a(1)=18 because the median of {2,3,2,5,3,7,2,3,5,11,3,13,7,5,2,17,3} = {2,2,2,2,3,3,3,3, *3*,5,5,5,7,7,11,13,17}.
		

Crossrefs

Other sequences about medians of prime factors: A124202, A126282, A281889, A284411, A290154, A308904.

Programs

  • Mathematica
    t = Table[0, {100}]; lst = {}; Do[lpf = FactorInteger[n][[ -1, 1]]; AppendTo[lst, lpf]; mdn = Median@lst; If[PrimeQ@ mdn, t[[PrimePi@mdn]] = n], {n, 2, 10^4}]; t

A124202 a(n) = median of the largest prime dividing a random n-digit number.

Original entry on oeis.org

3, 12, 53, 229, 947, 3863, 15731, 63823, 258737
Offset: 1

Views

Author

Mark Thornquist (mthornqu(AT)fhcrc.org), Dec 07 2006

Keywords

Comments

A randomly selected n-digit number (uniformly distributed on 10^(n-1) to 10^n-1) has at least a 50% probability of having a prime factor at least as large as a(n).
For n >= 2 the number m = 9*10^(n-1) of n-digit numbers is even. The median is taken to be the average of the (m/2)-th and (m/2+1)-th of the sorted list of largest prime factors. - Robert Israel, Dec 11 2015

Examples

			The largest prime divisors of the nonunit 1-digit numbers are 2, 3, 2, 5, 3, 7, 2 and 3 respectively, with median 3.
Of the 90 2-digit numbers, there are 45 whose largest prime divisor is 11 or less and 45 whose largest prime divisor is 13 or greater, so any of 11, 12, or 13 could be used for the second term, although the arithmetic average of the endpoints is commonly used.
		

References

  • D. E. Knuth, The Art of Computer Programming, Seminumerical Algorithms, Addison-Wesley, Reading, MA, 1969, Vol. 2.

Crossrefs

Programs

  • GAUSS
    n = 1;
    a = 2 | 3 | 2 | 5 | 3 | 7 | 2 | 3;
    meana = meanc(a);
    mediana = median(a);
    format /rdn 1,0;
    print n;; "-digit numbers:";
    print " Median = ";; mediana;
    format /rdn 10,5;
    print " Mean = ";; meana;
    print;
    b = 1 | a;
    dim = 1;
    _01: wait;
    n = n+1;
    dim = 10*dim;
    a = b | zeros(9*dim,1);
    i = dim;
    do until i == 10*dim;
    if i == 2*floor(i/2);
    a[i] = a[i/2];
    else;
    p = firstp(i);
    if p == i;
    a[i] = i;
    else;
    a[i] = a[i/p];
    endif;
    endif;
    i = i+1;
    endo;
    b = a[dim:10*dim-1];
    meana = meanc(b);
    mediana = median(b);
    format /rdn 1,0;
    print n;; "-digit numbers:";
    print " Median = ";; mediana;
    format /rdn 10,5;
    print " Mean = ";; meana;
    print;
    b = a;
    goto _01;
    proc firstp(n);
    local i;
    i = 3;
    do until i > sqrt(n);
    if n == i*floor(n/i);
    retp(i);
    endif;
    i = i+2;
    endo;
    retp(n);
    endp;
    
  • MATLAB
    P = primes(10^8);
    L = zeros(1,10^8);
    for p = P
         L([p:p:10^8]) = p;
    end
    A(1) = median(L(2:9));
    for d = 2:8
        A(d) = median(L(10^(d-1):10^d-1));
    end
    A   % Robert Israel, Dec 11 2015
    
  • Maple
    seq(Statistics:-Median([seq(max(numtheory:-factorset(n)),n=10^(d-1)..10^d-1)]),d=1..7); # Robert Israel, Dec 11 2015
  • Mathematica
    f[n_] := Block[{k = If[n == 1, 1, 0], lst = {}, pt = 10^(n - 1)}, While[k < 9*pt, AppendTo[lst, FactorInteger[pt + k][[ -1, 1]]]; k++ ]; Median@ lst]; (* Robert G. Wilson v, Dec 14 2006 *)
  • Python
    from sympy import factorint
    from statistics import median
    def a(n):
      lb, ub = max(2, 10**(n-1)), 10**n
      return int(round(median([max(factorint(i)) for i in range(lb, ub)])))
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Mar 12 2021

Extensions

Edited by Robert G. Wilson v, Dec 14 2006
a(8) from Robert Israel, Dec 11 2015
a(9) from Giovanni Resta, Apr 19 2016
Showing 1-3 of 3 results.