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-10 of 12 results. Next

A333254 Lengths of maximal runs in the sequence of prime gaps (A001223).

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 20 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.
Also lengths of maximal arithmetic progressions of consecutive primes.

Examples

			The prime gaps split into the following runs: (1), (2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), (2), (6), (4), ...
		

Crossrefs

The version for A000002 is A000002. Similarly for A001462.
The unequal version is A333216.
The weakly decreasing version is A333212.
The weakly increasing version is A333215.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
Positions of first appearances are A335406.
The first term of the first length-n arithmetic progression of consecutive primes is A006560(n), with index A089180(n).
Prime gaps are A001223.
Positions of adjacent equal prime gaps are A064113.
Positions of adjacent unequal prime gaps are A333214.

Programs

  • Maple
    p:= 3: t:= 1: R:= NULL: s:= 1: count:= 0:
    for i from 2 while count < 100 do
      q:= nextprime(p);
      g:= q-p; p:= q;
      if g = t then s:= s+1
      else count:= count+1; R:= R, s; t:= g; s:= 1;
      fi
    od:
    R; # Robert Israel, Jan 06 2021
  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],#1==#2&]//Most

Formula

Partial sums are A333214.

A054819 First term of weak prime quartet: p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2).

Original entry on oeis.org

17, 41, 79, 107, 227, 281, 311, 347, 349, 379, 397, 439, 461, 499, 569, 641, 673, 677, 827, 857, 881, 907, 1031, 1061, 1091, 1187, 1229, 1277, 1301, 1319, 1367, 1427, 1429, 1451, 1487, 1489, 1549, 1607, 1619, 1621, 1697, 1877, 1997, 2027, 2087, 2153
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Examples

			From _Gus Wiseman_, May 31 2020: (Start)
The first 10 strictly increasing prime gap quartets:
   17   19   23   29
   41   43   47   53
   79   83   89   97
  107  109  113  127
  227  229  233  239
  281  283  293  307
  311  313  317  331
  347  349  353  359
  349  353  359  367
  379  383  389  397
(End)
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly decreasing prime gap quartets are A335278.
Strictly increasing prime gap quartets are A335277.
Equal prime gap quartets are A090832.
Weakly increasing prime gap quartets are A333383.
Weakly decreasing prime gap quartets are A333488.
Unequal prime gap quartets are A333490.
Partially unequal prime gap quartets are A333491.
Positions of adjacent equal prime gaps are A064113.
Positions of strict ascents in prime gaps are A258025.
Positions of strict descents in prime gaps are A258026.
Positions of adjacent unequal prime gaps are A333214.
Positions of weak ascents in prime gaps are A333230.
Positions of weak descents in prime gaps are A333231.
Lengths of maximal weakly decreasing sequences of prime gaps are A333212.
Lengths of maximal strictly increasing sequences of prime gaps are A333253.

Programs

  • Mathematica
    wpqQ[lst_]:=Module[{diffs=Differences[lst]},diffs[[1]]Harvey P. Dale, Jun 12 2012 *)
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-xx] (* Gus Wiseman, May 31 2020 *)

Formula

a(n) = prime(A335277(n)). - Gus Wiseman, May 31 2020

A054804 First term of strong prime quartets: prime(m+1)-prime(m) > prime(m+2)-prime(m+1) > prime(m+3)-prime(m+2).

Original entry on oeis.org

31, 61, 89, 211, 271, 293, 449, 467, 607, 619, 709, 743, 839, 863, 919, 1069, 1291, 1409, 1439, 1459, 1531, 1637, 1657, 1669, 1723, 1759, 1777, 1831, 1847, 1861, 1979, 1987, 2039, 2131, 2311, 2357, 2371, 2447, 2459, 2477, 2503, 2521, 2557, 2593, 2633
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Primes preceding the first member of pairs of consecutive primes in A051634 ("strong primes"), see example. (A051634 lists the middle member of the triplets, here we list the first member of the quadruplets.) - M. F. Hasler, Oct 27 2018, corrected thanks to Gus Wiseman, Jun 01 2020.

Examples

			The first 10 strictly decreasing prime gap quartets:
   31  37  41  43
   61  67  71  73
   89  97 101 103
  211 223 227 229
  271 277 281 283
  293 307 311 313
  449 457 461 463
  467 479 487 491
  607 613 617 619
  619 631 641 643
For example, the primes (211,223,227,229) have differences (12,4,2), which are strictly decreasing, so 211 is in the sequence.
The second and third term of each quadruplet are consecutive terms in A051634: this is a characteristic property of this sequence. - _M. F. Hasler_, Jun 01 2020
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
All of the following use prime indices rather than the primes themselves:
- Strictly decreasing prime gap quartets are A335278.
- Strictly increasing prime gap quartets are A335277.
- Equal prime gap quartets are A090832.
- Weakly increasing prime gap quartets are A333383.
- Weakly decreasing prime gap quartets are A333488.
- Unequal prime gap quartets are A333490.
- Partially unequal prime gap quartets are A333491.
- Adjacent equal prime gaps are A064113.
- Strict ascents in prime gaps are A258025.
- Strict descents in prime gaps are A258026.
- Adjacent unequal prime gaps are A333214.
- Weak ascents in prime gaps are A333230.
- Weak descents in prime gaps are A333231.
Maximal weakly increasing intervals of prime gaps are A333215.
Maximal strictly decreasing intervals of prime gaps are A333252.

Programs

  • Maple
    primes:= select(isprime,[seq(i,i=3..10000,2)]):
    L:=  primes[2..-1]-primes[1..-2]:
    primes[select(t -> L[t+2] < L[t+1] and L[t+1] < L[t], [$1..nops(L)-2])]; # Robert Israel, Jun 28 2018
  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-x>z-y>t-z:>x] (* Gus Wiseman, May 31 2020 *)
    Select[Partition[Prime[Range[400]],4,1],Max[Differences[#,2]]<0&][[All,1]] (* Harvey P. Dale, Jan 12 2023 *)

Formula

a(n) = prime(A335278(n)). - Gus Wiseman, May 31 2020

A333216 Lengths of maximal subsequences without adjacent equal terms in the sequence of prime gaps.

Original entry on oeis.org

2, 13, 21, 3, 7, 8, 1, 18, 29, 5, 3, 8, 11, 31, 4, 20, 3, 7, 5, 19, 21, 32, 1, 19, 48, 19, 29, 32, 7, 38, 1, 43, 12, 33, 46, 6, 16, 8, 4, 34, 15, 1, 19, 7, 1, 23, 28, 30, 22, 8, 1, 7, 1, 52, 14, 56, 10, 26, 2, 30, 65, 5, 71, 12, 44, 39, 37, 6, 19, 47, 11, 10
Offset: 1

Views

Author

Gus Wiseman, Mar 15 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.
Essentially the same as A145024. - R. J. Mathar, Mar 16 2020

Examples

			The prime gaps split into the following subsequences without adjacent equal terms: (1,2), (2,4,2,4,2,4,6,2,6,4,2,4,6), (6,2,6,4,2,6,4,6,8,4,2,4,2,4,14,4,6,2,10,2,6), (6,4,6), (6,2,10,2,4,2,12), (12,4,2,4,6,2,10,6), ...
		

Crossrefs

First differences of A064113.
The version for the Kolakoski sequence is A306323.
The weakly decreasing version is A333212.
The weakly increasing version is A333215.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
The equal version is A333254.

Programs

  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],UnsameQ]//Most

Formula

Ones correspond to balanced prime quartets (A054800), so the sum of terms up to but not including the n-th one is A000720(A054800(n - 1)) = A090832(n).

A333215 Lengths of maximal weakly increasing subsequences in the sequence of prime gaps (A001223).

Original entry on oeis.org

4, 2, 3, 2, 1, 4, 2, 1, 2, 3, 1, 2, 3, 2, 2, 3, 3, 2, 2, 3, 1, 3, 2, 3, 2, 1, 3, 1, 3, 2, 4, 2, 3, 3, 2, 2, 3, 1, 3, 1, 2, 3, 2, 2, 2, 3, 2, 3, 1, 2, 1, 4, 2, 4, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 3, 1, 3, 1, 3, 3, 1, 4, 4, 2, 2, 2, 3, 2, 3, 1, 5, 3, 2, 2, 4, 3, 3
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.

Examples

			The prime gaps split into the following weakly increasing subsequences: (1,2,2,4), (2,4), (2,4,6), (2,6), (4), (2,4,6,6), (2,6), (4), (2,6), (4,6,8), (4), (2,4), (2,4,14), ...
		

Crossrefs

Prime gaps are A001223.
Ones correspond to strong prime quartets A054804.
Weakly increasing runs of compositions in standard order are A124766.
First differences of A258026 (with zero prepended).
The version for the Kolakoski sequence is A332875.
The weakly decreasing version is A333212.
The unequal version is A333216.
Positions of weak ascents in prime gaps are A333230.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
The equal version is A333254.

Programs

  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],#1<=#2&]//Most

Formula

Ones correspond to strong prime quartets (A054804), so the sum of terms up to but not including the n-th one is A000720(A054804(n - 1)).

A333231 Positions of weak descents in the sequence of differences between primes.

Original entry on oeis.org

2, 4, 6, 9, 11, 12, 15, 16, 18, 19, 21, 24, 25, 27, 30, 32, 34, 36, 37, 39, 40, 42, 44, 46, 47, 48, 51, 53, 54, 55, 56, 58, 59, 62, 63, 66, 68, 72, 73, 74, 77, 80, 82, 84, 87, 88, 91, 92, 94, 97, 99, 101, 102, 103, 106, 107, 108, 110, 111, 112, 114, 115, 118
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

Comments

Partial sums of A333253.

Examples

			The prime gaps split into the following strictly increasing subsequences: (1,2), (2,4), (2,4), (2,4,6), (2,6), (4), (2,4,6), (6), (2,6), (4), (2,6), (4,6,8), (4), (2,4), (2,4,14), ...
		

Crossrefs

The version for the Kolakoski sequence is A025505.
The version for equal differences is A064113.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for distinct differences is A333214.
The version for weak ascents is A333230.
First differences are A333253 (if the first term is 0).
Prime gaps are A001223.
Weakly decreasing runs of compositions in standard order are A124765.
Strictly increasing runs of compositions in standard order are A124768.
Runs of prime gaps with nonzero differences are A333216.

Programs

  • Mathematica
    Accumulate[Length/@Split[Differences[Array[Prime,100]],#1<#2&]]//Most
    - or -
    Select[Range[100],Prime[#+1]-Prime[#]>=Prime[#+2]-Prime[#+1]&]

Formula

Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) >= 0.

A333212 Lengths of maximal weakly decreasing subsequences in the sequence of prime gaps (A001223).

Original entry on oeis.org

1, 2, 2, 2, 1, 2, 3, 1, 3, 3, 2, 1, 3, 2, 1, 2, 2, 2, 3, 3, 2, 2, 4, 1, 2, 5, 3, 1, 3, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 1, 2, 2, 4, 1, 4, 4, 3, 1, 3, 2, 1, 1, 2, 5, 3, 2, 2, 2, 2, 2, 1, 3, 1, 3, 1, 2, 1, 3, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 3
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.

Examples

			The prime gaps split into the following weakly decreasing subsequences: (1), (2,2), (4,2), (4,2), (4), (6,2), (6,4,2), (4), (6,6,2), (6,4,2), (6,4), (6), ...
		

Crossrefs

First differences of A258025 (with zero prepended).
The version for the Kolakoski sequence is A332273.
The weakly increasing version is A333215.
The unequal version is A333216.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
The equal version is A333254.
Prime gaps are A001223.
Positions of adjacent equal differences are A064113.
Weakly decreasing runs of compositions in standard order are A124765.
Positions of strict ascents in the sequence of prime gaps are A258025.

Programs

  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],#1>=#2&]//Most

Formula

Ones correspond to weak prime quartets A054819, so the sum of terms up to but not including the n-th one is A000720(A054819(n - 1)).

A333252 Lengths of maximal strictly decreasing subsequences in the sequence of prime gaps (A001223).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 1, 1, 2, 3, 2, 1, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 3, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 3, 3, 1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 2, 2, 2, 2, 2, 1, 3, 1, 3, 1, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.

Examples

			The prime gaps split into the following strictly decreasing subsequences: (1), (2), (2), (4,2), (4,2), (4), (6,2), (6,4,2), (4), (6), (6,2), (6,4,2), (6,4), (6), (8,4,2), (4,2), (4), (14,4), (6,2), (10,2), (6), (6,4), (6), ...
		

Crossrefs

The weakly decreasing version is A333212.
The weakly increasing version is A333215.
The unequal version is A333216.
First differences of A333230 (if the first term is 0).
The strictly increasing version is A333253.
The equal version is A333254.
Prime gaps are A001223.
Strictly decreasing runs of compositions in standard order are A124769.
Positions of strict descents in the sequence of prime gaps are A258026.

Programs

  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],#1>#2&]//Most

Formula

Partial sums are A333230. The partial sum up to but not including the n-th one is A333381(n - 1).

A333383 First index of weakly increasing prime quartets.

Original entry on oeis.org

1, 2, 7, 13, 14, 22, 28, 35, 38, 45, 49, 54, 60, 64, 69, 70, 75, 78, 85, 89, 95, 104, 109, 116, 117, 122, 123, 144, 148, 152, 155, 159, 160, 163, 164, 173, 178, 182, 183, 184, 187, 194, 195, 198, 201, 206, 212, 215, 218, 219, 225, 226, 230, 236, 237, 238, 244
Offset: 1

Views

Author

Gus Wiseman, May 14 2020

Keywords

Comments

Let g(i) = prime(i + 1) - prime(i). These are numbers k such that g(k) <= g(k + 1) <= g(k + 2).

Examples

			The first 10 weakly increasing prime quartets:
    2   3   5   7
    3   5   7  11
   17  19  23  29
   41  43  47  53
   43  47  53  59
   79  83  89  97
  107 109 113 127
  149 151 157 163
  163 167 173 179
  197 199 211 223
For example, 43 is the 14th prime, and the primes (43,47,53,59) have differences (4,6,6), which are weakly increasing, so 14 is in the sequence.
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly decreasing prime quartets are A054804.
Strictly increasing prime quartets are A054819.
Equal prime quartets are A090832.
Weakly increasing prime quartets are A333383 (this sequence).
Weakly decreasing prime quartets are A333488.
Unequal prime quartets are A333490.
Partially unequal prime quartets are A333491.
Positions of adjacent equal prime gaps are A064113.
Positions of strict ascents in prime gaps are A258025.
Positions of strict descents in prime gaps are A258026.
Positions of adjacent unequal prime gaps are A333214.
Positions of weak ascents in prime gaps are A333230.
Positions of weak descents in prime gaps are A333231.
Indices of weakly increasing rows of A066099 are A225620.
Lengths of maximal weakly increasing subsequences of prime gaps: A333215.
Lengths of maximal strictly decreasing subsequences of prime gaps: A333252.

Programs

  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-x<=z-y<=t-z:>PrimePi[x]]

A333488 First index of weakly decreasing prime quartets.

Original entry on oeis.org

11, 15, 18, 24, 36, 39, 46, 47, 53, 54, 55, 58, 62, 72, 73, 87, 91, 101, 102, 106, 107, 110, 111, 114, 118, 127, 128, 129, 132, 146, 150, 157, 180, 186, 193, 199, 210, 217, 223, 228, 232, 239, 242, 259, 260, 263, 269, 270, 271, 274, 275, 282, 283, 284, 290
Offset: 1

Views

Author

Gus Wiseman, May 15 2020

Keywords

Comments

Let g(i) = prime(i + 1) - prime(i). These are numbers k such that g(k) >= g(k + 1) >= g(k + 2).

Examples

			The first 10 weakly decreasing prime quartets:
   31  37  41  43
   47  53  59  61
   61  67  71  73
   89  97 101 103
  151 157 163 167
  167 173 179 181
  199 211 223 227
  211 223 227 229
  241 251 257 263
  251 257 263 269
For example, 241 is the 53rd prime, and the primes (241,251,257,263) have differences (10,6,6), which are weakly decreasing, so 53 is in the sequence.
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly decreasing prime quartets are A054804.
Strictly increasing prime quartets are A054819.
Equal prime quartets are A090832.
Weakly increasing prime quartets are A333383.
Weakly decreasing prime quartets are A333488 (this sequence).
Unequal prime quartets are A333490.
Partially unequal prime quartets are A333491.
Positions of adjacent equal prime gaps are A064113.
Positions of strict ascents in prime gaps are A258025.
Positions of strict descents in prime gaps are A258026.
Positions of adjacent unequal prime gaps are A333214.
Positions of weak ascents in prime gaps are A333230.
Positions of weak descents in prime gaps are A333231.
Indices of weakly decreasing rows of A066099 are A114994.
Lengths of maximal weakly decreasing subsequences of prime gaps: A333212.
Lengths of maximal strictly increasing subsequences of prime gaps: A333253.

Programs

  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-x>=z-y>=t-z:>PrimePi[x]]
Showing 1-10 of 12 results. Next