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-10 of 12 results. Next

A289661 a(n) is the smallest m such that p = n-th popular prime = A385503(n) is popular on the interval [2,m].

Original entry on oeis.org

2, 3, 45, 70, 1456, 4845, 20332, 46345, 106812, 153032, 592760, 2484190, 2620033, 2623860, 41163150, 237321819, 1966462280, 13690728506, 64322151699, 79838726306, 220355977754, 232268764689, 618745965579, 1882062393429, 9607711921430, 19364051434020, 26393150922356, 37636607775855, 114514665136326, 173974642506024, 228013323182523, 259772852488365, 284600479332862, 644741545074402
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2017

Keywords

Comments

See A385503 for further links and information.

Crossrefs

Extensions

Edited, with terms updated from revised version of McNew, by Peter Munn, Jul 04 2025

A289665 Number of integers in the interval [2,A289663(n)] whose greatest prime factor is equal to the n-th popular prime A385503(n).

Original entry on oeis.org

4, 14, 25, 77, 151, 428, 616, 1005, 1517, 2902, 7664, 7722, 8284, 48380, 161644, 698074, 2761234, 8357693, 9758410, 20285553, 21123128, 43031555, 96835113, 318539488, 534261087, 672081919, 873949289, 1997008416, 2720040151, 3321778833, 3663025425, 3924572413, 7241174991
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2017

Keywords

Comments

See A385503 for further links and information.

Crossrefs

Extensions

Edited, with terms updated from revised version of McNew, by Peter Munn, Jul 04 2025
Name corrected by Pontus von Brömssen, Jul 05 2025

A289662 a(n) is the smallest m such that p = n-th popular prime = A385503(n) is uniquely popular on the interval [2,m] or -1 if p is never uniquely popular.

Original entry on oeis.org

2, 12, 80, 196, 1638, 4864, 22425, 46500, 109779, 158625, 603564, 2552416, 2620142, 2627250, 41163747, 237398795, 1966466950, 13690729828, 64322158656, 79838739611, 220355987735, 232268774850, 618745972214, 1882062476406, 9607713772982, 19364051829855, 26393150937218, 37636607806688, 114514665167797, 173974642809066, 228013323978930, 259772858868378, 284600479573629, 644741545246282
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2017

Keywords

Comments

See A385503 for further links and information.

Crossrefs

Extensions

Deleted "first" from definition. - N. J. A. Sloane, Oct 03 2019
Edited, and terms updated from revised version of McNew, by Peter Munn, Jul 04 2025

A289663 a(n) is the largest m such that p = n-th popular prime = A385503(n) is popular on the interval [2,m].

Original entry on oeis.org

17, 119, 279, 1858, 5471, 29301, 53474, 117303, 220523, 611374, 2642391, 2672025, 2952463, 41192601, 237611044, 1967277194, 13692930957, 64358549949, 79880100420, 220369251374, 232880841877, 618765808209, 1882062587041, 9607847299025, 19364476224949, 26396066576762, 37636861534247, 114519204438979, 173975018331581, 228013888964263, 259777078505983, 284734190312531, 644744279642231
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2017

Keywords

Comments

There is a slight doubt about these numbers since McNew only carried a search up to a certain point.
See A385503 for further links and information.

Crossrefs

Extensions

Edited, with terms updated from revised version of McNew, by Peter Munn, Jul 04 2025

A289664 Number of integers in the interval [2,A289661(n)] whose greatest prime factor is equal to the n-th popular prime A385503(n).

Original entry on oeis.org

1, 1, 8, 10, 67, 140, 344, 563, 947, 1197, 2846, 7357, 7621, 7629, 48357, 161507, 697875, 2760913, 8354317, 9754751, 20284680, 21082412, 43030537, 96835105, 318536223, 534252383, 672026918, 873944930, 1996949860, 2720035791, 3321772681, 3662980704, 3923186891, 7241151976
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2017

Keywords

Comments

See A385503 for further links and information.

Crossrefs

Extensions

Edited, with terms updated from revised version of McNew, by Peter Munn, Jul 04 2025
Name corrected by Pontus von Brömssen, Jul 05 2025

A386007 Least k such that there are exactly n primes that are popular on the interval [2,k] (see A385503); i.e., exactly n primes share the lead as the most common greatest prime factor of the numbers 2..k.

Original entry on oeis.org

2, 3, 70, 2626355
Offset: 1

Views

Author

Pontus von Brömssen, Jul 14 2025

Keywords

Examples

			a(3) = 70, because the 3 primes 3, 5, and 7 all occur A385652(70) = 10 times (the maximum) as the greatest prime factor of the numbers 2..70, and for earlier intervals there is never a tie between 3 numbers.
a(4) = 2626355, because the 4 primes 73, 83, 109, and 113 all occur A385652(2626355) = 7634 times (the maximum) as the greatest prime factor of the numbers 2..2626355, and for earlier intervals there is never a tie between 4 numbers.
		

Crossrefs

Programs

  • Mathematica
    gpf[n_]:=FactorInteger[n][[-1,1]];a[n_]:=Module[{k=1},Until[Length[Commonest[gpf/@Range[2,k]]]==n,k++];k] (* James C. McMahon, Jul 20 2025 *)

A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 5, 31, 2, 11, 17, 7, 3, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 7, 5, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 7, 2, 13, 11, 67, 17, 23, 7, 71, 3, 73, 37, 5, 19, 11, 13, 79, 5, 3, 41, 83, 7, 17, 43
Offset: 1

Views

Author

Keywords

Comments

The initial term a(1)=1 is purely conventional: The unit 1 is not a prime number, although it has been considered so in the past. 1 is the empty product of prime numbers, thus 1 has no largest prime factor. - Daniel Forgues, Jul 05 2011
Greatest noncomposite number dividing n, (cf. A008578). - Omar E. Pol, Aug 31 2013
Conjecture: Let a, b be nonzero integers and f(n) denote the maximum prime factor of a*n + b if a*n + b <> 0 and f(n)=0 if a*n + b=0 for any integer n. Then the set {n, f(n), f(f(n)), ...} is finite of bounded size. - M. Farrokhi D. G., Jan 10 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
  • H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A020639 (smallest prime divisor), A034684, A028233, A034699, A053585.
Cf. A046670 (partial sums), A104350 (partial products).
See A385503 for "popular" primes.

Programs

  • Magma
    [ #f eq 0 select 1 else f[ #f][1] where f is Factorization(n): n in [1..86] ]; // Klaus Brockhaus, Oct 23 2008
    
  • Maple
    with(numtheory,divisors); A006530 := proc(n) local i,t1,t2,t3,t4,t5; t1 := divisors(n); t2 := convert(t1,list); t3 := sort(t2); t4 := nops(t3); t5 := 1; for i from 1 to t4 do if isprime(t3[t4+1-i]) then return t3[t4+1-i]; fi; od; 1; end;
    # alternative
    A006530 := n->max(1,op(numtheory[factorset](n))); # Peter Luschny, Nov 02 2010
  • Mathematica
    Table[ FactorInteger[n][[ -1, 1]], {n, 100}] (* Ray Chandler, Nov 12 2005 and modified by Robert G. Wilson v, Jul 16 2014 *)
  • PARI
    A006530(n)=if(n>1,vecmax(factor(n)[,1]),1) \\ Edited to cover n=1. - M. F. Hasler, Jul 30 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else max(factorint(n))
    print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Aug 08 2022
    
  • SageMath
    def A006530(n): return list(factor(n))[-1][0] if n > 1 else 1
    print([A006530(n) for n in range(1, 87)])  # Peter Luschny, Jan 07 2024
  • Scheme
    ;; The following uses macro definec for the memoization (caching) of the results. A naive implementation of A020639 can be found under that entry. It could be also defined with definec to make it faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme
    (definec (A006530 n) (let ((spf (A020639 n))) (if (= spf n) spf (A006530 (/ n spf)))))
    ;; Antti Karttunen, Mar 12 2017
    

Formula

a(n) = A027748(n, A001221(n)) = A027746(n, A001222(n)); a(n)^A071178(n) = A053585(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = A000040(A061395(n)). - M. F. Hasler, Jan 16 2015
a(n) = n + 1 - Sum_{k=1..n} (floor((k!^n)/n) - floor(((k!^n)-1)/n)). - Anthony Browne, May 11 2016
n/a(n) = A052126(n). - R. J. Mathar, Oct 03 2016
If A020639(n) = n [when n is 1 or a prime] then a(n) = n, otherwise a(n) = a(A032742(n)). - Antti Karttunen, Mar 12 2017
a(n) has average order Pi^2*n/(12 log n) [Brouwer]. See also A046670. - N. J. A. Sloane, Jun 26 2017

Extensions

Edited by M. F. Hasler, Jan 16 2015

A124661 Primes prime(n) such that prime(n-k)+prime(n+k) >= 2*prime(n) for k = 1..n-2.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 73, 83, 109, 113, 181, 199, 283, 293, 313, 317, 463, 467, 503, 509, 523, 619, 661, 683, 691, 887, 1063, 1069, 1103, 1109, 1123, 1129, 1303, 1307, 1321, 1327, 1613, 1621, 1627, 1637, 1669, 1789
Offset: 1

Views

Author

Artur Jasinski, Dec 23 2006

Keywords

Comments

The first two primes, 2 and 3, are tested against an empty set of k, and we include them, defining such a test to have a positive outcome.
McNew's "popular primes" sequence (A385503) has the same first 14 terms, differing first by excluding 181. McNew says that a prime p is "popular" on an interval [2, k] if no prime occurs more frequently than p as the greatest prime factor (gpf, A006530) of the integers in that interval. - N. J. A. Sloane, Jul 25 2017 and Peter Munn, Jul 01 2025
See the Pomerance link for a proof that the sequence is infinite. - Peter Munn, Jul 01 2025

Examples

			prime(11)=31 is in the sequence because prime(10)+prime(12) = 66, prime(9)+prime(13) = 64,..., prime(2)+prime(20) = 74 are all >= 62 = 2*31.
prime(10) = 29 is not in the sequence because prime(9)+prime(11) = 54 for example is smaller than 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 300, Function[{p, n}, NoneTrue[Range[n - 2], Prime[n - #] + Prime[n + #] < 2 p &]] @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Jul 25 2017 *)
  • PARI
    isok(p) = {n = primepi(p); for (k=1, n-2, if (prime(n-k) + prime(n+k) < 2*p, return (0));); return (1);}
    lista(nn) = {for(n=1, nn, if (isok(prime(n)), print1(prime(n), ", ");););} \\ Michel Marcus, Nov 03 2013
    
  • Python
    from sympy import prime
    A124661_list = []
    for n in range(1,10**6):
        p = prime(n)
        for k in range(1,n-1):
            if prime(n-k)+prime(n+k) < 2*p:
                break
        else:
            A124661_list.append(p) # Chai Wah Wu, Jul 25 2017

Extensions

Sequence extended by R. J. Mathar, Mar 28 2010
Edited, restoring previous name, by Peter Munn, Jul 01 2025

A385652 Maximum frequency of gpf(k) for 2 <= k <= n, where gpf(k) = A006530(k) is the greatest prime factor of k.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12
Offset: 2

Views

Author

Pontus von Brömssen, Jul 06 2025

Keywords

Comments

The prime p is popular on the interval [2,n] if it is the greatest prime factor of a(n) numbers in that interval; see A385503.

Examples

			     |     | cumulative frequencies for gpf's |
   n | gpf |    2  3  5  7 11 13 17 19 23     | a(n)
  ---+-----+----------------------------------+-----
   2 |   2 |    1  0  0  0  0  0  0  0  0     |  1
   3 |   3 |    1  1  0  0  0  0  0  0  0     |  1
   4 |   2 |    2  1  0  0  0  0  0  0  0     |  2
   5 |   5 |    2  1  1  0  0  0  0  0  0     |  2
   6 |   3 |    2  2  1  0  0  0  0  0  0     |  2
   7 |   7 |    2  2  1  1  0  0  0  0  0     |  2
   8 |   2 |    3  2  1  1  0  0  0  0  0     |  3
   9 |   3 |    3  3  1  1  0  0  0  0  0     |  3
  10 |   5 |    3  3  2  1  0  0  0  0  0     |  3
  11 |  11 |    3  3  2  1  1  0  0  0  0     |  3
  12 |   3 |    3  4  2  1  1  0  0  0  0     |  4
  13 |  13 |    3  4  2  1  1  1  0  0  0     |  4
  14 |   7 |    3  4  2  2  1  1  0  0  0     |  4
  15 |   5 |    3  4  3  2  1  1  0  0  0     |  4
  16 |   2 |    4  4  3  2  1  1  0  0  0     |  4
  17 |  17 |    4  4  3  2  1  1  1  0  0     |  4
  18 |   3 |    4  5  3  2  1  1  1  0  0     |  5
  19 |  19 |    4  5  3  2  1  1  1  1  0     |  5
  20 |   5 |    4  5  4  2  1  1  1  1  0     |  5
  21 |   7 |    4  5  4  3  1  1  1  1  0     |  5
  22 |  11 |    4  5  4  3  2  1  1  1  0     |  5
  23 |  23 |    4  5  4  3  2  1  1  1  1     |  5
  24 |   3 |    4  6  4  3  2  1  1  1  1     |  6
		

Crossrefs

Programs

  • PARI
    gpf(n) = if (n==1,1, vecmax(factor(n)[,1])); \\ A006530
    a(n) = my(v=vector(n, k, gpf(k)), s=Set(v)); vecmax(apply(x->#x, vector(#s, i, select(x->(x==s[i]), v)))); \\ Michel Marcus, Jul 06 2025
  • Python
    from collections import Counter
    from itertools import count
    from sympy import factorint
    def A385652_generator():
        c = Counter()
        M = 0
        for n in count(2):
            gpf = max(factorint(n))
            c[gpf] += 1
            if c[gpf] > M: M += 1
            yield M
    

Formula

a(n) = max_{k=2..n} A078899(k).

A385653 Least k such that A385652(k) = n.

Original entry on oeis.org

2, 4, 8, 12, 18, 24, 27, 36, 48, 54, 72, 80, 90, 100, 120, 125, 135, 150, 160, 180, 196, 210, 224, 245, 252, 280, 294, 315, 336, 343, 350, 378, 392, 420, 441, 448, 490, 504, 525, 560, 567, 588, 630, 672, 686, 700, 735, 756, 784, 840, 875, 882, 896, 945, 980
Offset: 1

Views

Author

Pontus von Brömssen, Jul 06 2025

Keywords

Comments

A385654(n) is uniquely popular on the interval [2,a(n)]; see A289662.
Equivalently, a(n) is the least k >= 2 such that A078899(k) = n.

Crossrefs

Programs

  • PARI
    gpf(n) = if (n==1,1, vecmax(factor(n)[,1])); \\ A006530
    f(n) = my(v=vector(n, k, gpf(k)), s=Set(v)); vecmax(apply(x->#x, vector(#s, i, select(x->(x==s[i]), v)))); \\ A385652
    a(n) = my(k=2); while (f(k) !=n, k++); k; \\ Michel Marcus, Jul 06 2025
Showing 1-10 of 12 results. Next