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 21-30 of 34 results. Next

A333253 Lengths of maximal strictly increasing subsequences in the sequence of prime gaps (A001223).

Original entry on oeis.org

2, 2, 2, 3, 2, 1, 3, 1, 2, 1, 2, 3, 1, 2, 3, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 1, 3, 3, 2, 2, 3, 1, 3, 1, 2, 3, 2, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 4, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 1, 3, 1, 3, 3, 1, 2, 2, 2
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 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 weakly decreasing version is A333212.
The weakly increasing version is A333215.
The unequal version is A333216.
First differences of A333231 (if its first term is 0).
The strictly decreasing version is A333252.
The equal version is A333254.
Prime gaps are A001223.
Strictly increasing runs of compositions in standard order are A124768.
Positions of strict ascents in the sequence of prime gaps are A258025.

Programs

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

Formula

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

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]]

A333490 First index of unequal prime quartets.

Original entry on oeis.org

7, 8, 10, 11, 13, 17, 18, 19, 20, 22, 23, 24, 28, 30, 31, 32, 34, 40, 42, 44, 47, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 75, 76, 78, 79, 82, 83, 85, 86, 87, 89, 90, 91, 94, 95, 96, 97, 98, 99, 104, 111, 112, 113, 114, 115, 116, 119
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), and g(k + 2) are all different.

Examples

			The first 10 unequal prime quartets:
  17  19  23  29
  19  23  29  31
  29  31  37  41
  31  37  41  43
  41  43  47  53
  59  61  67  71
  61  67  71  73
  67  71  73  79
  71  73  79  83
  79  83  89  97
For example, 83 is the 23rd prime, and the primes (83,89,97,101) have differences (6,8,4), which are all distinct, so 23 is in the sequence.
		

Crossrefs

Primes are A000040.
Prime gaps are A001223.
Second prime gaps are A036263.
Indices of unequal rows of A066099 are A233564.
Lengths of maximal anti-run subsequences of prime gaps are A333216.
Lengths of maximal runs of prime gaps are A333254.
Maximal anti-runs in standard compositions are counted by A333381.
Indices of anti-run rows of A066099 are A333489.
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.
Unequal prime quartets are A333490 (this sequence).
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.

Programs

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

A333491 First index of partially unequal prime quartets.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 37, 40, 41, 42, 43, 44, 47, 48, 49, 50, 51, 52, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80, 81, 82
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), but we may have g(k) = g(k + 2).

Examples

			The first 10 partially unequal prime quartets:
   5  7 11 13
   7 11 13 17
  11 13 17 19
  13 17 19 23
  17 19 23 29
  19 23 29 31
  23 29 31 37
  29 31 37 41
  31 37 41 43
  37 41 43 47
		

Crossrefs

Primes are A000040.
Prime gaps are A001223.
Second prime gaps are A036263.
Indices of unequal rows of A066099 are A233564.
Lengths of maximal anti-runs of prime gaps are A333216.
Lengths of maximal runs of prime gaps are A333254.
Maximal anti-runs in standard compositions are counted by A333381.
Indices of anti-run rows of A066099 are A333489.
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.
Unequal prime quartets are A333490.
Partially unequal prime quartets are A333491 (this sequence).
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.

Programs

  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-x!=z-y&&z-y!=t-z:>PrimePi[x]]
    PrimePi[#]&/@(Select[Partition[Prime[Range[90]],4,1],#[[2]]-#[[1]]!=#[[3]]-#[[2]]&&#[[3]]-#[[2]]!=#[[4]]-#[[3]]&][[;;,1]]) (* Harvey P. Dale, Aug 05 2025 *)

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]]

A335406 First position of n in the sequence of run-lengths of the sequence of prime gaps.

Original entry on oeis.org

1, 2, 49, 633353, 6706139
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.

Crossrefs

Positions of first appearances in A333254.
The unequal version is 7, 1, 4, 15, 10, 36, 5, 6, 84, ...
The weakly decreasing version is 1, 2, 7, 23, 26, ...
The weakly increasing version is 5, 2, 3, 1, 81, 193, ...
The strictly decreasing version is 1, 4, 8, 150, 160, ...
The strictly increasing version is 6, 1, 4, 38, 221, ...
Prime gaps are A001223.
The first term of the first length-n arithmetic progression of consecutive primes is A006560(n), with index A089180(n).
Positions of adjacent equal prime gaps are A064113.
Positions of adjacent unequal prime gaps are A333214.

Programs

  • Mathematica
    qe=Length/@Split[Differences[Array[Prime,10000]],SameQ];
    Table[Position[qe,i][[1,1]],{i,Union[qe]}]

Extensions

a(5) from Giovanni Resta, Jun 11 2020

A121862 Least previously nonoccurring positive integer such that partial sum + 2 is prime.

Original entry on oeis.org

1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, 36, 38, 22, 30, 48, 56, 54, 46, 44, 42, 60, 40, 50, 58, 66, 62, 52, 68, 64, 84, 90, 72, 92, 70, 96, 80, 94, 78, 104, 76, 74, 106, 102, 110, 88, 98, 82, 108, 114, 126, 116, 118, 86, 100, 120, 144, 122, 130, 128, 136
Offset: 1

Views

Author

Jonathan Vos Post, Aug 30 2006

Keywords

Comments

The sequence is the union of {1} and a permutation of even positive integers. The corresponding partial sums + 1 are 3, 5, 11, 19, 23, 37, 47, 59, 79, 97, 113, 137, 163, 191, 223. See A084758. - Zak Seidov, Feb 10 2015
Or, first differences of A084758. - Zak Seidov, Feb 10 2015

Examples

			a(1) = 1 because 1+2 = 3 is prime.
a(2) = 2 because 1+2+2 = 5 is prime.
a(3) = 6 because 1+2+6+2 = 11 is prime.
a(4) = 8 because 1+2+6+8+2 = 19 is prime.
a(5) = 4 because 1+2+6+8+4+2 = 23 is prime.
		

Crossrefs

Cf. A084758. - Zak Seidov, Feb 10 2015

Programs

  • Maple
    M:= 300: # to get all entries before the first entry > N
    a[1]:= 1:
    s:= 3:
    R:= {seq(2*i,i=1..M/2)}:
    found:= true:
    for n from 2 while found do
      found:= false;
      for r in R do
        if isprime(s+r) then
          a[n]:= r;
          s:= s + r;
          R:= R minus {r};
          found:= true;
          break
        fi
       od:
    od:
    seq(a[i],i=1..n-2); # Robert Israel, Feb 10 2015
  • Mathematica
    f[s_] := Append[s, k = 1; p = 2 + Plus @@ s; While[MemberQ[s, k] || ! PrimeQ[p + k], k++ ]; k]; Nest[f, {}, 67] (* Robert G. Wilson v, Aug 31 2006 *)

Formula

a(n) = MIN{k>0 such that 2 + k + SUM[i=1..n-1]a(i) is prime and k <> a(i)}.

Extensions

More terms from Robert G. Wilson v, Aug 31 2006

A335277 First index of strictly increasing prime quartets.

Original entry on oeis.org

7, 13, 22, 28, 49, 60, 64, 69, 70, 75, 78, 85, 89, 95, 104, 116, 122, 123, 144, 148, 152, 155, 173, 178, 182, 195, 201, 206, 212, 215, 219, 225, 226, 230, 236, 237, 244, 253, 256, 257, 265, 288, 302, 307, 315, 325, 328, 329, 332, 333, 336, 348, 355, 361, 373
Offset: 1

Views

Author

Gus Wiseman, May 30 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 strictly increasing prime 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
For example, 107 is the 28th prime, and the primes (107,109,113,127) have differences (2,4,14), which are strictly increasing, so 28 is in the sequence.
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly decreasing prime quartets are A335278.
Equal prime quartets are A090832.
Weakly increasing prime quartets are A333383.
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.
Lengths of maximal weakly decreasing sequences of prime gaps are A333212.
Lengths of maximal strictly increasing sequences of prime gaps are A333253.

Programs

  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-xPrimePi[x]]

Formula

prime(a(n)) = A054819(n).

A335278 First index of strictly decreasing prime quartets.

Original entry on oeis.org

11, 18, 24, 47, 58, 62, 87, 91, 111, 114, 127, 132, 146, 150, 157, 180, 210, 223, 228, 232, 242, 259, 260, 263, 269, 274, 275, 282, 283, 284, 299, 300, 309, 321, 344, 350, 351, 363, 364, 367, 368, 369, 375, 378, 382, 388, 393, 399, 406, 409, 413, 431, 442, 446
Offset: 1

Views

Author

Gus Wiseman, May 30 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 strictly decreasing prime 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, 211 is the 47th prime, and the primes (211,223,227,229) have differences (12,4,2), which are strictly decreasing, so 47 is in the sequence.
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly increasing prime quartets are A335277.
Equal prime quartets are A090832.
Weakly increasing prime quartets are A333383.
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 strictly decreasing rows of A066099 are A333256.
Lengths of maximal weakly increasing sequences of prime gaps are A333215.
Lengths of maximal strictly decreasing sequences of prime gaps are A333252.

Programs

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

Formula

prime(a(n)) = A054804(n).
Previous Showing 21-30 of 34 results. Next