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-4 of 4 results.

A060308 Largest prime <= 2n.

Original entry on oeis.org

2, 3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 23, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 47, 47, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 79, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113, 113, 113, 113, 127, 127, 131
Offset: 1

Views

Author

Labos Elemer, Mar 27 2001

Keywords

Comments

a(n) is the smallest k such that C(2n,n) divides k!. - Benoit Cloitre, May 30 2002
a(n) is largest prime factor of C(2n,n) = (2n)!/(n!)^2. - Alexander Adamchuk, Jul 11 2006
a(n) is also the largest prime in the interval [n,2n]. - Peter Luschny, Mar 04 2011
Odd prime p repeats (q-p)/2 times, where q > p is the next prime. In particular, every lesser of twin primes (A001359) occurs 1 time, every lesser more than 3 of cousin primes (A023200) occurs 2 times, etc. - Vladimir Shevelev, Mar 12 2012

Examples

			n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.
		

Crossrefs

Apart from initial term, same as A060265.
Cf. A007917 (largest prime <= n), A005843 (2n).

Programs

Formula

a(n) = Max[FactorInteger[(2n)!/(n!)^2]]. - Alexander Adamchuk, Jul 11 2006
a(n) = A006530(A000142(2*n)) and a(n) = A006530(A056040(2*n)). - Peter Luschny, Mar 04 2011
a(n) ~ 2*n as n tends to infinity. - Vladimir Shevelev, Mar 12 2012
a(n) = A007917(A005843(n)) = A226078(n, A067434(n)). - Reinhard Zumkeller, May 25 2013

Extensions

More terms from Alexander Adamchuk, Jul 11 2006

A060266 Difference between 2n and the following prime.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 5, 3, 1, 7, 5, 3, 1, 3, 1, 1, 3, 1, 1, 3, 1, 13, 11, 9, 7, 5, 3, 1, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 5, 3, 1, 5, 3, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 3, 1, 1, 11, 9, 7, 5
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*i)-2*i,i=1..256)];
  • Mathematica
    d2n[n_]:=Module[{c=2n},NextPrime[c]-c]; Array[d2n,120] (* Harvey P. Dale, May 14 2011 *)
    Table[NextPrime@ # - # &[2 n], {n, 120}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = nextprime(2*n+1) - 2*n; \\ Michel Marcus, Feb 19 2017

Formula

Conjecture: Limit_{n->oo} (Sum_{k=1..n} a(k)) / (Sum_{k=1..n} log(2*k)) = 1. - Alain Rocchelli, Oct 24 2023

A060271 Difference between smallest prime following and largest prime preceding 2*(n-th prime).

Original entry on oeis.org

2, 2, 4, 4, 4, 6, 6, 4, 4, 6, 6, 6, 4, 6, 8, 4, 14, 14, 6, 10, 10, 6, 4, 6, 4, 12, 12, 12, 12, 4, 6, 6, 6, 4, 14, 14, 4, 14, 6, 10, 6, 8, 4, 6, 8, 4, 10, 6, 8, 4, 4, 12, 8, 4, 12, 18, 18, 6, 10, 6, 6, 10, 4, 12, 12, 10, 12, 4, 10, 10, 8, 10, 6, 8, 4, 8, 14, 10, 12, 10, 10, 14, 4, 14, 4, 4, 20, 8
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			For n = 1: prime(1) = 2, 2*prime(1) = 4 is between 3 and 5, their difference is 2 = a(1).
For n = 6: prime(6) = 13, 2*prime(6) = 26 is between 23 and 29 and their difference is 6 = a(6).
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*ithprime(j))-prevprime(2*ithprime(j)),j=1...256)];
  • Mathematica
    dsplp[n_]:=Module[{np=2Prime[n]},NextPrime[np]-NextPrime[np,-1]]; Array[ dsplp,90] (* Harvey P. Dale, Mar 20 2013 *)
  • PARI
    a(n) = {my(m = 2*prime(n)); nextprime(m+1) - precprime(m-1);} \\ Amiram Eldar, Feb 08 2025

Extensions

Offset changed to 1 and a(1) prepended by Amiram Eldar, Feb 08 2025

A092937 Differences nextprime(2k) - precprime(2k) having maximum prime density for 2k <= 10^n.

Original entry on oeis.org

6, 6, 6, 6, 12, 18, 18, 30
Offset: 2

Views

Author

Cino Hilliard, Apr 18 2004

Keywords

Comments

The density of primes occurring with these numbers A060267(2k) appears to max out at higher and higher values of 6x. For example, looking at numbers in the sequence for next and prec prime differences <= 50, we have the following table for n-th powers of 10.
k| max| density
2| 6 | 21
3| 6 | 132
4| 6 | 897
5| 6 | 5820
6| 12 | 48030
7| 18 | 394659
8| 18 | 3462648
9| 30 | 32669865
Conjecture: The maximum density occurs at increasing multiples of 6 as the number of primes tested approaches infinity. E.g. the number of nextprime - precprime occurrences for 2k <= 10^10 will be 30 or higher. This appears as a plausable statement since as 2k increases, the probability that the difference between the next and preceding prime will contain larger and larger prime factors.

Examples

			For n = 3, we have the difference between nextprime and precprime for 2k <= 10^3:
   2k | occurrences
  -----------------
    2 |  35
    4 |  80
    6 | 132
    8 |  60
   10 |  80
   12 |  44
   14 |  49
   16 |   0
   18 |   9
   20 |  10
6 occurs 132 times in the differences for 2k <= 10^3. Thus 6 has the maximum number of occurrences and is the second entry in the table. So a(3) = 6.
		

Crossrefs

Cf. A060267.

Programs

  • PARI
    prmppr(n) = { mx=0; f = vector(floor(sqrt(n)+2)); forstep(x=4,n,2,y=nextprime(x)-precprime(x); print1(y","); if(y>mx,mx=y); f[y]++; ); print(); mx2=0; forstep(x=2,mx,2, if(f[x] > mx2,mx2=f[x];d=x); print(x","f[x]); ); print(d","mx2) } \\ use prmppr(1000) to get a(3)=6
    
  • PARI
    f(n) = nextprime(2*n+1) - precprime(2*n-1); \\ A060267
    a(n) = {my(v=vector(10^n/2-1, k, f(k+1))); my(nbm = 0, imax = 0); forstep (i=vecmin(v), vecmax(v), 2, my(nb = #select(x->(x==i), v)); if (nb > nbm, nbm = nb; imax = i);); imax;} \\ Michel Marcus, Sep 16 2020

Extensions

Edited by Michel Marcus, Sep 16 2020
Showing 1-4 of 4 results.