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

A100687 Erroneous duplicate of A058044.

Original entry on oeis.org

1, 2, 2, 2, 2, 18, 48, 46, 80, 130, 74, 120, 118, 136, 174, 132, 168, 198, 190, 130, 176, 234, 358, 102, 354, 364, 336, 324, 486, 442
Offset: 1

Views

Author

Keywords

A060270 Distance of n-th primorial from previous prime.

Original entry on oeis.org

1, 1, 11, 1, 1, 29, 23, 43, 41, 73, 59, 1, 89, 67, 73, 107, 89, 101, 127, 97, 83, 89, 1, 251, 131, 113, 151, 263, 251, 223, 179, 389, 281, 151, 197, 173, 239, 233, 191, 223, 223, 293, 593, 293, 457, 227, 311, 373, 257, 307, 313, 607, 347, 317, 307, 677, 467, 317
Offset: 2

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			Before 7th primorial 510481 is the largest prime. Its distance from 510510 is a(7)=29.
		

Crossrefs

Programs

  • Maple
    [seq(product(ithprime(j),j=1..n)-prevprime(product(ithprime(j),j=1..n)), n=2..50)];
  • Mathematica
    Map[# - NextPrime[#, -1] &, Rest@ FoldList[Times, Prime@ Range[59]]] (* Michael De Vlieger, Aug 10 2023 *)
  • PARI
    a(n) = my(P=vecprod(primes(n))); P-precprime(P-1); \\ Michel Marcus, Aug 11 2023

Formula

a(n)=1 for n=2, 3, 5, 6, 13, 24, 66, 68, 167, ... (A057704); a(n)=A055211(n) otherwise. - Jeppe Stig Nielsen, Oct 31 2003

Extensions

More terms from Jeppe Stig Nielsen, Oct 31 2003

A060269 Distance of n-th primorial from closest prime.

Original entry on oeis.org

1, 1, 1, 1, 19, 23, 37, 41, 1, 59, 1, 47, 67, 59, 61, 89, 89, 103, 79, 83, 89, 1, 103, 131, 113, 127, 223, 191, 163, 179, 389, 239, 151, 167, 173, 239, 199, 191, 199, 223, 233, 593, 293, 457, 227, 311, 373, 257
Offset: 3

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			7th primorial is surrounded by {510529,510481} primes in {19,71} distances of which the smaller is 19=a(7).
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(min(nextprime(product(ithprime(j),j=1..n))-product(ithprime(j),j= >1..n),product(ithprime(j),j=1..n)-prevprime(product(ithprime(j),j=1..n >))), n=3..50)];
  • Mathematica
    dnp[n_]:=Module[{a=NextPrime[n,-1],b=NextPrime[n]},Min[n-a,b-n]]; dnp/@ FoldList[Times,Prime[Range[50]]] (* Harvey P. Dale, Jul 11 2017 *)

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

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

A340041 The prime gap, divided by two, which surrounds p#.

Original entry on oeis.org

1, 1, 6, 1, 9, 24, 23, 40, 51, 37, 60, 36, 68, 87, 66, 84, 99, 95, 115, 88, 117, 143, 51, 177, 182, 168, 139, 243, 221, 193, 204, 516, 260, 154, 182, 306, 239, 216, 191, 211, 303, 263, 672, 303, 615, 417, 312, 378, 275, 375, 322, 445, 312, 294, 354, 492, 399, 348, 461
Offset: 2

Views

Author

Robert G. Wilson v, Jan 22 2021

Keywords

Comments

If p and q are consecutive primes, we say here that there is a gap of q-p. (Other sequences use different definitions of "gap".) - N. J. A. Sloane, Mar 07 2021
Records: 1, 6, 9, 24, 40, 51, 60, 68, 87, 99, 115, 117, 143, 177, 182, 243, 516, 672, 855, 915, 925, 1100, 1139, 1620, 1863, 2272, 2842, 4177, 4190, 5025, 5692, 6254, 6413, 6879, 7914, 8026, 9928, 10604, ..., .

Examples

			For a(1), there are two contiguous primes {2, 3} with 2 being 2#. The prime gap is 1. However, the two primes do not surround 2#, so a(1) like A340013(2) is undefined.
For a(2), the prime gap contains {5, 6, 7}, with 3# = 6 in the middle. The prime gap is 2, therefore a(2) = 1;
For a(3), the prime gap contains {29, 30, 31}, with 5# = 30  in the middle. The prime gap is 2, therefore a(3) = 1.
For a(4), the prime gap contains {199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211}, with 7# =  205 in the middle. The prime gap is 12, therefore a(4) = 6. etc.
		

Crossrefs

Cf. A006862, A007014, A038711, A060270, A340013 (analog for n!).

Programs

  • Mathematica
    a[n_] := Block[{p = Times @@ Prime@ Range@ n}, (NextPrime[p, 1] - NextPrime[p, -1])/2]; a[1] = 0; Array[a, 60]

Formula

a(n) = (A006862(n) - A007014(n))/2 = (A038711(n) + A060270(n))/2.
a(n) = A058044(n)/2. - Hugo Pfoertner, Jan 22 2021
Showing 1-6 of 6 results.