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 11-20 of 41 results. Next

A031168 a(n) = prime(n+6) - prime(n).

Original entry on oeis.org

15, 16, 18, 22, 20, 24, 24, 24, 24, 24, 28, 24, 26, 28, 26, 26, 24, 28, 30, 30, 30, 28, 26, 24, 30, 30, 34, 32, 40, 38, 30, 32, 30, 34, 30, 30, 34, 30, 30, 26, 32, 42, 36, 36, 36, 40, 30, 28, 30, 34, 36, 32, 36, 30, 26, 30, 38, 40, 36, 36, 48, 44, 40, 38, 40, 42, 36
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031168 n = a031168_list !! (n-1)
    a031168_list = zipWith (-) (drop 6 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+6)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    seq(ithprime(n+6)-ithprime(n), n=1..70);
  • Mathematica
    a=6; t=Array[Prime,123]; Drop[t,a]-Drop[t,-a] (* Vladimir Joseph Stephan Orlovsky, Aug 13 2009 *)
    Last[#]-First[#]&/@Partition[Prime[Range[80]],7,1] (* Harvey P. Dale, Jan 12 2012 *)

Extensions

Offset changed from 2 to 1, and a(1)=15 added, by Vincenzo Librandi, Apr 23 2011

A031169 a(n) = prime(n+7) - prime(n).

Original entry on oeis.org

17, 20, 24, 24, 26, 28, 26, 28, 30, 30, 30, 30, 30, 30, 32, 30, 30, 36, 34, 32, 34, 30, 30, 38, 34, 36, 36, 42, 42, 44, 36, 36, 36, 40, 32, 40, 36, 34, 32, 38, 44, 46, 38, 40, 42, 42, 40, 34, 36, 40, 38, 38, 40, 32, 36, 44, 42, 42, 40, 50, 54, 54, 42, 42, 46, 50, 42
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031169 n = a031169_list !! (n-1)
    a031169_list = zipWith (-) (drop 7 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+7)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    ithprime(n+7)-ithprime(n);
  • Mathematica
    #[[8]]-#[[1]]&/@Partition[Prime[Range[80]],8,1] (* Harvey P. Dale, Sep 16 2020 *)

Extensions

Offset changed from 2 to 1 and a(1)=17 inserted by Vincenzo Librandi, Apr 23 2011

A031170 a(n) = prime(n+8) - prime(n).

Original entry on oeis.org

21, 26, 26, 30, 30, 30, 30, 34, 36, 32, 36, 34, 32, 36, 36, 36, 38, 40, 36, 36, 36, 34, 44, 42, 40, 38, 46, 44, 48, 50, 40, 42, 42, 42, 42, 42, 40, 36, 44, 50, 48, 48, 42, 46, 44, 52, 46, 40, 42, 42, 44, 42, 42, 42, 50, 48, 44, 46, 54, 56, 64, 56, 46, 48, 54, 56, 48
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031170 n = a031170_list !! (n-1)
    a031170_list = zipWith (-) (drop 8 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+8)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    ithprime(n+8)-ithprime(n);
  • Mathematica
    Table[Prime[n+8]-Prime[n],{n,1,100}]  (* Harvey P. Dale, Mar 23 2011 *)

Formula

a(n) = A000040(n+8) - A000040(n). - Zak Seidov, Mar 23 2011

A031171 a(n) = prime(n+9) - prime(n).

Original entry on oeis.org

27, 28, 32, 34, 32, 34, 36, 40, 38, 38, 40, 36, 38, 40, 42, 44, 42, 42, 40, 38, 40, 48, 48, 48, 42, 48, 48, 50, 54, 54, 46, 48, 44, 52, 44, 46, 42, 48, 56, 54, 50, 52, 48, 48, 54, 58, 52, 46, 44, 48, 48, 44, 52, 56, 54, 50, 48, 60, 60, 66, 66, 60, 52, 56, 60, 62, 52
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031171 n = a031171_list !! (n-1)
    a031171_list = zipWith (-) (drop 9 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+9)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    ithprime(n+9)-ithprime(n);
  • Mathematica
    Table[Prime[n+9]-Prime[n],{n,80}] (* Harvey P. Dale, Jan 29 2023 *)

Extensions

Offset changed from 2 to 1 and a(1)=27 inserted by Vincenzo Librandi, Apr 23 2011

A162201 First differences of A162200.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 28 2009

Keywords

Comments

The absolute value of a(n) is also the length of the n-th vertical edge in the graph of the "mountain path" function for prime numbers.
See A162200 for the length of the n-th horizontal component.

Crossrefs

Programs

Formula

From R. J. Mathar, Jul 15 2009: (Start)
a(n) = A052288(n-1) if n >= 2, n even.
a(n) = 2 - A052288(n-1) if n >= 3, n odd. (End)

Extensions

Edited by Omar E. Pol, Jul 02 2009
More terms from R. J. Mathar, Jul 15 2009

A031132 Record differences between n-th prime and (n+2)-nd prime.

Original entry on oeis.org

3, 4, 6, 10, 12, 14, 18, 24, 28, 40, 42, 44, 48, 50, 56, 58, 72, 76, 80, 82, 100, 114, 116, 126, 138, 140, 160, 190, 200, 234, 236, 246, 248, 270, 306, 328, 330, 336, 340, 372, 376, 410, 436, 438, 450, 476, 502, 506, 524, 540, 546, 594, 600, 624, 678, 690, 700, 760, 780, 838, 900, 944, 972, 1014, 1016, 1032, 1152
Offset: 1

Views

Author

Keywords

Examples

			The difference a(49) = 524 first occurs at prime(2158173265) - prime(2158173263) = 50949283633 - 50949283109 = 524. - _Jon E. Schoenfield_, Aug 29 2006
		

Crossrefs

See A031133 for lower primes and A031134 for upper primes.

Programs

  • Mathematica
    d = 0; lst = {}; {p, q, r} = {1, 2, 3}; Do[{p, q, r} = {q, r, Prime@n}; If[r - p > d, d = r - p; AppendTo[lst, {p, r}]; Print[{p, r-p, r}]], {n, 212550893}]; Last /@ lst - First /@ lst (* Robert G. Wilson v, May 17 2006 *)
    dist = 0; n = 0; While[n<250000000, n++; tmp = Prime[n + 2] - Prime[n]; If[tmp > dist, dist = tmp; Print[tmp]];]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 08 2006 *)

Formula

Extensions

Extended (and first term added) by Patrick De Geest, Oct 15 2000
Further extended by Jud McCranie, Jan 03 2001 and again on May 18 2006
a(50)-a(52) from Jon E. Schoenfield, Sep 02 2006
a(53)-a(55) from Dmitry Kamenetsky, Jul 28 2008
a(55) corrected, a(56)-a(62) added by Dmitry Petukhov, Sep 22 2015
a(63)-a(67) added by Vladimir Chirkov and Natalia Makarova, Sep 24 2015, Sep 29 2015

A046930 Size of sea of composite numbers surrounding n-th prime.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			23 is in a sea of 8 composites: 20,21,22,23,24,25,26,27,28.
		

Crossrefs

Programs

  • Haskell
    a046930 1 = 1
    a046930 n = subtract 2 $ a031131 n  -- Reinhard Zumkeller, Dec 19 2013
  • Maple
    [ seq(ithprime(i)-ithprime(i-2)-2,i=3..100) ];
  • Mathematica
    Table[ Prime[n + 2] - Prime[n] - 2, {n, 75}] (* Robert G. Wilson v Oct 27 2004 *)
    Join[{1},#[[3]]-#[[1]]-2&/@Partition[Prime[Range[90]],3,1]] (* Harvey P. Dale, Sep 26 2012 *)

Formula

a(n) = A031131(n) - 2 for n > 1. - Reinhard Zumkeller, Dec 19 2013

Extensions

More terms from Michel ten Voorde

A031133 Lower prime of a record difference between it and the second prime after it.

Original entry on oeis.org

2, 3, 5, 19, 47, 83, 109, 199, 1123, 1321, 2161, 2477, 5591, 9551, 14087, 19603, 19609, 31393, 31397, 38461, 58789, 155893, 360653, 370247, 396733, 1357193, 1561891, 4652317, 8917463, 20831299, 38089217, 70396343, 72546143, 102765577
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; {p, q, r} = {1, 2, 3}; d = 0; Do[{p, q, r} = {q, r, Prime@n}; If[r - p > d, d = r - p; AppendTo[lst, {p, r}]; Print[{p, r-p, r}]], {n, 8050000}]; First /@ lst (* Robert G. Wilson v, May 17 2006 *)
  • PARI
    gap=0;p=2;q=3;forprime(r=5,1e9,if(r-p>gap,gap=r-p;print1(p", ")); p=q;q=r) \\ Charles R Greathouse IV, Mar 06 2013

Formula

Extensions

Extended (and first term added) by Patrick De Geest, Oct 15 2000
Further extended by Jud McCranie, Jan 03 2001
a(34)-a(52) from Jon E. Schoenfield, Sep 02 2006
a(53)-a(55) added by Dmitry Kamenetsky, Jul 28 2008
a(55) corrected, a(56)-a(62) added by Dmitry Petukhov, Sep 20 2015
a(63)-a(67) added by Vladimir Chirkov and Natalia Makarova, Sep 24 2015, Sep 29 2015

A031134 Upper prime of a record difference between it and the second prime before it.

Original entry on oeis.org

5, 7, 11, 29, 59, 97, 127, 223, 1151, 1361, 2203, 2521, 5639, 9601, 14143, 19661, 19681, 31469, 31477, 38543, 58889, 156007, 360769, 370373, 396871, 1357333, 1562051, 4652507, 8917663, 20831533, 38089453, 70396589, 72546391, 102765847
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; {p, q, r} = {1, 2, 3}; d = 0; Do[{p, q, r} = {q, r, Prime@n}; If[r - p > d, d = r - p; AppendTo[lst, {p, r}]; Print[{p, r-p, r}]], {n, 8050000}]; Last /@ lst (* Robert G. Wilson v, May 17 2006 *)

Formula

Extensions

Extended (and first term added) by Patrick De Geest, Oct 15 2000
Corrected and extended by Jud McCranie, Jan 03 2001
a(34)-a(52) from Jon E. Schoenfield, Sep 02 2006
Definition corrected by Jon E. Schoenfield, Aug 27 2006
a(53)-a(55) added by Dmitry Kamenetsky, Jul 28 2008
a(55) corrected, a(56)-a(62) added by Dmitry Petukhov, Sep 20 2015
a(63)-a(67) added by Vladimir Chirkov and Natalia Makarova, Sep 25 2015, Sep 29 2015

A122412 Indices of primes occurring in A031133.

Original entry on oeis.org

1, 2, 3, 8, 15, 23, 29, 46, 188, 216, 326, 367, 738, 1183, 1662, 2224, 2225, 3384, 3385, 4058, 5948, 14356, 30802, 31544, 33608, 104070, 118504, 325851, 597310, 1319944, 2324139, 4140008, 4258994, 5911613, 8040877, 17567976, 23163297, 25203779
Offset: 1

Views

Author

Jon E. Schoenfield, Sep 02 2006

Keywords

Examples

			a(4)=8 because the 4th term of A031133 is the 8th prime number.
		

Crossrefs

Formula

a(n) = pi(A031133(n)).
Previous Showing 11-20 of 41 results. Next