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.

Previous Showing 51-60 of 67 results. Next

A161794 Largest prime gap for primes less than (n+1)^2.

Original entry on oeis.org

1, 2, 4, 4, 6, 6, 6, 6, 8, 8, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 22, 22, 22, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34
Offset: 1

Views

Author

Daniel Tisdale, Jun 19 2009

Keywords

Examples

			For n = 1, the primes less than (n+1)^2 = 4 are 2,3. The only prime gap is 3 - 2 = 1, and this is the first element in the sequence.
For n = 2, the primes less than 9 are 2,3,5,7. The prime gaps are {1, 2,2}, of which the largest is 2. This is the second element in the sequence.
		

Crossrefs

Programs

  • PARI
    a(n) = my(vp = primes(primepi((n+1)^2))); vecmax(vector(#vp-1, k, vp[k+1] - vp[k])); \\ Michel Marcus, Aug 15 2022

Extensions

Edited and extended by Ray Chandler, May 06 2010

A196672 Record gaps between Chebyshev primes (of index 1).

Original entry on oeis.org

4, 26, 42, 126, 146, 162, 176, 470, 542, 1370, 1516, 4412, 8196, 14928, 27542, 30974, 51588, 62906
Offset: 1

Views

Author

Michel Planat, Oct 05 2011

Keywords

Comments

The Chebyshev prime beginning the gap is A196673.

Crossrefs

Cf. A005250 (increasing gaps between primes).
Cf. A182877 (record gaps between Ramanujan primes).

A228775 a(n) is the maximal k>=1 such that nextprime(j*n)<=(j+1)*n, j=1,...,k.

Original entry on oeis.org

2, 3, 7, 5, 17, 14, 16, 24, 12, 19, 28, 43, 86, 80, 34, 82, 78, 73, 69, 66, 117, 329, 57, 222, 171, 228, 178, 470, 291, 359, 505, 366, 585, 576, 644, 544, 423, 742, 502, 636, 765, 466, 936, 578, 697, 682, 541, 1442, 640, 627, 615, 603, 2025, 1660, 570, 1833
Offset: 1

Views

Author

Vladimir Shevelev, Sep 04 2013

Keywords

Examples

			If n=3, then, for j=1, nextprime(3)<=6; for j=2, nextprime(6)<=9; for j=3,nextprime(9)<=12; for j=4, nextprime(12)<=15; for j=5, nextprime(15)<=18; for j=6,nextprime(18)<=21; for j=7, nextprime(21)<=24, BUT for j=8, nextprime(24)>27. Thus a(3)=7.
		

Crossrefs

Main sequence is A110835.

Programs

  • Mathematica
    a[n_] := For[k = 1, True, k++, If[NextPrime[k*n] <= (k+1)*n && NextPrime[(k+1)*n] > (k+2)*n, Return[k]]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 05 2013 *)

Formula

Conjectural inequality: for n>=2, a(n) <= log^2(n*a(n)). This essentially corresponds to Cramer's conjecture for prime gaps.

Extensions

More terms from Peter J. C. Moses

A254033 Number of primes dividing exactly one number in the next largest gap between primes.

Original entry on oeis.org

0, 1, 2, 3, 6, 10, 15, 20, 21, 28, 37, 44, 53, 76, 96, 113, 123, 135, 142, 150, 181, 191, 235, 270, 291, 294, 313, 327, 334, 395, 403, 411, 445, 478, 496, 539, 582, 587, 654, 693, 722, 732, 757, 754, 772, 778, 791, 832, 830, 848, 920, 930, 955, 1004, 1053, 1151, 1240
Offset: 1

Views

Author

Mamuka Jibladze, Jan 23 2015

Keywords

Examples

			The 5th largest prime gap (after 2-3, 3-5, 7-11 and 23-29) occurs between 89 and 97, and there are 6 primes which occur exactly once in this gap, namely 7 (dividing 91), 13 (dividing 91), 19 (dividing 95), 23 (dividing 92), 31 (dividing 93) and 47 (dividing 94), so a(5)=6.
		

Crossrefs

Sequences related to increasing prime gaps: A005250, A002386, A000101, A005669.

Programs

  • Mathematica
    gp = (* the list of primes in A002386 *); f[n_] := Block[{p = gp[[n]], q = NextPrime[ gp[[n]]]}, r = Range[p + 1, q - 1]; lng = Length@ r; t = Split@ Sort@ Flatten@ Table[ First@# & /@ FactorInteger[ r[[i]]], {i, lng}]; Length@ Select[t, Length@# == 1 &]]; Array[f, 75] (* Robert G. Wilson v, Jan 23 2015 *)

Extensions

a(43)-a(57) from Robert G. Wilson v, Jan 23 2015

A339385 a(n) = (smallest prime >= A002182(n)) - (largest prime <= A002182(n)).

Original entry on oeis.org

0, 2, 2, 2, 6, 6, 6, 2, 14, 2, 2, 8, 8, 14, 18, 24, 18, 12, 2, 12, 14, 12, 30, 32, 18, 24, 2, 40, 2, 30, 26, 30, 18, 14, 34, 14, 40, 18, 20, 40, 34, 36, 18, 20, 42, 120, 90, 24, 34, 52, 44, 72, 20, 20, 38, 44, 42, 54, 24, 60, 72, 20, 72, 30, 20, 20, 24, 70
Offset: 2

Views

Author

A.H.M. Smeets, Dec 02 2020

Keywords

Comments

The prime gap size at the n-th highly composite number A002182(n), for n > 2.
The obtained arithmetic mean of the normalized gap size, i.e., a(n)/log(A002182(n)), for the terms 3..10000 is 3.030.
From Gauss's prime counting function approximation, the expected gap size should be approximately log(A002182), however, the observed values seem to be closer to log(A002182(n)^3).
The maximum merit (= a(n)/log(prevprime(A002182))) in the range 3..10000 is 12.96 and is obtained for n = 6911.

Crossrefs

Programs

  • Mathematica
    s = {}; dm = 1; Do[d = DivisorSigma[0, n]; If[d > dm, dm = d; AppendTo[s, NextPrime[n - 1] - NextPrime[n + 1, -1]]], {n, 2, 10^6}]; s (* Amiram Eldar, Dec 02 2020 *)
    {0}~Join~Map[Subtract @@ NextPrime[#, {1, -1}] &, Import["https://oeis.org/A002182/b002182.txt", "Data"][[3 ;; 10^3, -1]] ] (* Michael De Vlieger, Dec 10 2020 *)
  • PARI
    lista(nn) = my(r=1); forstep(n=2, nn, 2, if(numdiv(n)>r, r=numdiv(n); print1(nextprime(n) - precprime(n), ", "))); \\ Michel Marcus, Dec 03 2020

Formula

a(n) = A324385(n)+A141345(n), for n > 1.

A364787 a(n) is the stabilization index of the prime ladder [P(n,k) : k >= 0].

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 17, 17, 19, 18, 13, 13, 11, 11, 47, 46, 39, 39, 59, 59, 68, 68, 71, 71, 61, 61, 60, 59, 56, 55, 49, 49, 47, 47, 334, 333, 508, 508, 488, 488, 466, 466, 423, 423, 512, 512, 488, 488, 468, 468, 450, 450, 696, 696, 652, 652, 639, 638, 613, 613
Offset: 0

Views

Author

Eduard Roure Perdices, Aug 07 2023

Keywords

Comments

Given n >= 0, we consider the following increasing sequence of prime numbers: P(n,0) = 2, and for k > 0, P(n,k) is the largest prime number smaller than or equal to P(n,k-1)+n. Since the sequence of all prime numbers has arbitrarily long gaps, there exists an index m >= 0 such that P(n,m) = P(n,m+1). We define a(n) as the smallest of such indices.
Note that a(n) displays big jumps at values of n corresponding to maximal prime gaps (A005250).
In general, for k >= 0, a(2k+1) = a(2k), but there are exceptions: for n = 0, 2, 4, 8, 14, 26, 28, 34, 56, 94, 154, and 484, |a(n+1) - a(n)| = 1. We don't know if there are more of these blips.

Examples

			a(4) = 7 because P(4,0) = 2, P(4,1) = 5, P(4,2) = 7, P(4,3) = 11, P(4,4) = 13, P(4,5) = 17, P(4,6) = 19, and for k >= 7, P(4,k) = 23.
		

Crossrefs

Programs

  • Mathematica
    SequenceA[n_] := Module[{pn0 = 2, pnk, an = 0},
       While[True, pnk = NextPrime[pn0 + n + 1, -1];
        If[pn0 == pnk, Break[], pn0 = pnk; an++]];
       Return[an];];

A382529 The composite numbers ordered by decreasing reciprocal-distance from the primes (reciprocal distance defined in comments).

Original entry on oeis.org

4, 6, 9, 8, 10, 15, 12, 14, 21, 26, 16, 25, 18, 20, 27, 34, 22, 33, 24, 35, 39, 28, 50, 30, 32, 45, 56, 49, 36, 51, 38, 64, 55, 40, 57, 42, 44, 63, 76, 46, 120, 65, 119, 93, 48, 69, 86, 121, 118, 92, 75, 52, 54, 94, 77, 122, 117, 81, 58, 85, 60, 62, 87, 123, 91, 144
Offset: 1

Views

Author

James Propp, Mar 30 2025

Keywords

Comments

The reciprocal distance between m and p is defined as d(m,p) = abs(1/m - 1/p).
The distance between a composite number m and the set of primes is d(m) = Min_{p prime} d(m,p), which means considering p which is the next prime below m, and q the next prime above m.
Bertrand's postulate p > m/2 means d(m) < 1/m so that all m with d(m) > epsilon are m < 1/epsilon.
The plot (e.g., ListPlot in Mathematica) shows interesting large-scale structure.

Examples

			a(3) and a(4) are 9 and 8 respectively. 9 precedes 8 in the list of composites because min(1/7-1/9,1/9-1/11) is greater than min(1/7-1/8,1/8-1/11).
		

Crossrefs

Programs

  • Mathematica
    epsilon = .0005; (* terms < 1/epsilon *);
    table = {}; For[m = 2, m <= 1/epsilon, m++, If[! PrimeQ[m], i = m; While[! PrimeQ[i], --i]; j = m; While[! PrimeQ[j], ++j]; dist = Min[1/i - 1/m, 1/m - 1/j]; If[dist > epsilon, table = Append[table, {dist, m}]]]]; init = Reverse[Sort[table]]; Transpose[init][[2]]
  • PARI
    a382529(nterms) = {my(m=nterms+nterms/log(nterms)+3*nterms/log(nterms)^2, mc=floor(m*if(nterms<337963, 4, log(m)/2-1)), C=vectorsmall(mc), L=List(), nc=0); forcomposite(n=4, mc, C[nc++]=n; my(d=min(1/precprime(n)-1/n,1/n-1/nextprime(n))); listput(L,d)); my(P=vecsort(L,,5)); vecextract(Vec(C),P)[1..nterms]}; \\ Hugo Pfoertner, Apr 22 2025

Extensions

More terms from Hugo Pfoertner, Mar 30 2025

A185441 Records in A185439; record gaps between consecutive emirps.

Original entry on oeis.org

4, 14, 34, 36, 112, 312, 1032, 3098, 10038, 30012, 100112, 300086, 1000158, 3000162, 10000056, 30000044, 100000422
Offset: 1

Views

Author

Jonathan Vos Post, Feb 03 2011

Keywords

Comments

This is to A005250 (increasing gaps between primes) as A006567 (emirps) are to A000040 (primes). Lower number of record emirp difference pair (emirp analog of A002386): 13, 17, 37, 113, 389, 1979, 3929.

Examples

			a(8) = 148th emirp - 147th emirp =  7027 - 3929 = 3098, given that R(7027) = 7207 is prime and R(3929) = 9293 is prime.
		

Crossrefs

Extensions

a(13) - a(17) from Nathaniel Johnston, Apr 26 2011

A243000 max {A053695(k) | k < n+2} - max {A053695(k) | k < n+1}.

Original entry on oeis.org

1, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Farideh Firoozbakht, May 31 2014

Keywords

Crossrefs

A244368 Related to small gaps between primes: a(n) = A235686(n)/2.

Original entry on oeis.org

0, 5, 6, 12, 14, 15, 17, 21, 24, 26, 27, 32, 35, 36, 39, 41, 45, 47, 50, 56, 57, 59, 60, 62, 66, 69, 74, 77, 84, 87, 89, 90, 92, 95, 96, 101, 102, 104, 110, 111, 116, 117, 125, 126, 129, 131, 132, 134, 140, 144, 147, 150, 155, 161, 162, 164, 165, 167, 171, 176, 179, 180, 182, 186, 189, 192, 195, 197, 200, 201, 204, 206, 209, 210, 215, 216, 221, 222, 225, 227, 231, 234, 236, 239, 242, 245, 246, 249, 252, 255, 264, 266, 267, 269, 272, 279, 281, 285, 287, 290, 291, 294, 297, 299, 300
Offset: 0

Views

Author

Omar E. Pol, Jun 30 2014

Keywords

Comments

The list is finite with 105 terms. Data section contains all terms of the sequence (the same as A235686).

Crossrefs

Formula

a(n) = A235686(n)/2.
Previous Showing 51-60 of 67 results. Next