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.

A378904 2*a(n) are the gaps that correspond to A350100(n).

Original entry on oeis.org

1, 2, 3, 7, 9, 10, 12, 13, 15, 17, 18, 20, 26, 27, 29, 33, 39, 41, 66, 75, 84, 90, 95, 100, 113, 126, 140, 144, 155, 162, 177, 204, 206, 210, 216, 302, 303, 364, 389, 391, 399, 418, 441, 469, 492, 497, 504, 520, 613, 723
Offset: 1

Views

Author

Hugo Pfoertner, Dec 15 2024

Keywords

Crossrefs

Programs

  • PARI
    a378904(kmax) = my(d=0); for(k=2, kmax, my(k2=k*k, dd=(nextprime(k2)-precprime(k2))/2); if(dd>d, print1(dd,", "); d=dd));
    a378904(10^6)
    
  • Python
    from itertools import count, islice
    from sympy import prevprime, nextprime
    def A378904_gen(): # generator of terms
        c = 0
        for k in count(2):
            a = nextprime(m:=k**2)-prevprime(m)
            if a>c:
                yield a>>1
                c = a
    A378904_list = list(islice(A378904_gen(),20)) # Chai Wah Wu, Dec 17 2024

Extensions

a(50) from Hugo Pfoertner, Jan 04 2025

A378429 Numbers k such that the prime gap between the consecutive primes p1 < k# = primorial(k) < p2 sets a new record.

Original entry on oeis.org

3, 7, 13, 17, 23, 29, 37, 43, 47, 61, 71, 79, 83, 97, 101, 109, 137, 193, 347, 349, 409, 457, 587, 599, 887, 929, 967, 1319, 1801, 1877, 2081, 2687, 2731, 2741, 2843, 2939, 2957, 3673, 3823, 4621, 5717, 6011, 6151, 6563, 6863, 7393, 8389, 9833, 11903, 12547
Offset: 1

Views

Author

Jean-Marc Rebert, Dec 20 2024

Keywords

Examples

			a(1) = 3, because the prime gap between the consecutive primes 5 < 3# < 7 sets the first record of 2.
 n gap       p1        a(n)#        p2
 1   2             5 <   3# <             7
 2  12           199 <   7# <           211
 3  18         30029 <  13# <         30047
 4  48        510481 <  17# <        510529
 5  80     223092827 <  23# <     223092907
 6 102    6469693189 <  29# <    6469693291
 7 120 7420738134751 <  37# < 7420738134871
		

Crossrefs

Extensions

a(32)-a(39) from Amiram Eldar, Dec 20 2024
a(40)-a(50) from Michael S. Branicky, Dec 21 2024

A379444 a(n) is the difference between the least prime > (n+1)^2 and the largest prime < n^2, divided by 2.

Original entry on oeis.org

4, 5, 8, 7, 11, 10, 11, 11, 15, 18, 17, 15, 17, 17, 21, 24, 25, 21, 23, 24, 31, 27, 30, 29, 30, 30, 40, 34, 40, 39, 35, 38, 38, 37, 41, 40, 42, 45, 48, 54, 51, 51, 47, 56, 50, 51, 57, 52, 66, 57, 60, 57, 64, 57, 65, 71, 65, 69, 67, 64, 78, 66, 68, 69, 72, 77, 81
Offset: 2

Views

Author

Hugo Pfoertner, Dec 23 2024

Keywords

Comments

2*a(n) would be the gap needed between consecutive primes to provide a counterexample to Legendre's conjecture that there is always a prime between n^2 and (n+1)^2. The gaps actually observed are significantly smaller; see A378904 for comparison.

Crossrefs

Programs

  • Mathematica
    a[n_]:=(NextPrime[(n+1)^2] - NextPrime[n^2,-1])/2; Array[a,67,2] (* Stefano Spezia, Jan 24 2025 *)
  • PARI
    a379444(n) = (nextprime((n+1)^2) - precprime(n^2))/2

Formula

a(n) = (A007491(n+1) - A053001(n))/2.
a(n) >= n + 2.

A379449 Numbers k such that the prime gap between the consecutive primes p1 < k! = factorial(k) < p2 sets a new record.

Original entry on oeis.org

3, 4, 5, 8, 13, 19, 24, 29, 34, 45, 47, 51, 56, 61, 71, 107, 127, 140, 184, 192, 198, 274, 284, 375, 384, 559, 592, 630, 689, 774, 792, 834, 1133, 1213, 1241, 1315, 1947
Offset: 1

Views

Author

Jean-Marc Rebert, Dec 23 2024

Keywords

Examples

			a(1) = 3, because the prime gap between the consecutive primes 5 < 3! < 7 sets the first record of 2.
 n gap            p1            <  x! <             p2
 1   2                        5 <  3! <                        7;
 2   6                       23 <  4! <                       29;
 3  14                      113 <  5! <                      127;
 4  54                    40289 <  8! <                    40343;
 5  90               6227020777 < 13! <               6227020867;
 6 190       121645100408831899 < 19! <       121645100408832089;
 7 204 620448401733239439359927 < 24! < 620448401733239439360131;
		

Crossrefs

Extensions

a(37) from Jinyuan Wang, Dec 23 2024
Showing 1-4 of 4 results.