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 26 results. Next

A054840 Seventh term of weak prime septet: p(m-5)-p(m-6) < p(m-4)-p(m-5) < p(m-3)-p(m-4) < p(m-2)-p(m-3) < p(m-1)-p(m-2) < p(m)-p(m-1).

Original entry on oeis.org

15427, 64997, 68261, 68947, 129023, 129037, 143567, 154153, 158071, 192461, 221773, 222493, 244529, 249797, 285421, 318737, 337327, 354421, 357967, 374287, 385471, 394787, 402631, 402691, 419687, 439253, 442003, 448519, 457459, 457739, 458309, 482569, 528041, 529927, 577589, 582809
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051635; A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Programs

  • Mathematica
    Select[Partition[Prime[Range[50000]],7,1],Min[Differences[#,2]]>0&][[;;,7]] (* Harvey P. Dale, Aug 25 2024 *)

Formula

a(n) = nextprime(A054839), nextprime = A151800;
A054840 = { A054833(n) | A054833(n) = nextprime(A054833(n-1)) }. - M. F. Hasler, Oct 27 2018

Extensions

Edited and more terms from M. F. Hasler, Oct 27 2018

A258026 Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) < 0.

Original entry on oeis.org

4, 6, 9, 11, 12, 16, 18, 19, 21, 24, 25, 27, 30, 32, 34, 37, 40, 42, 44, 47, 48, 51, 53, 56, 58, 59, 62, 63, 66, 68, 72, 74, 77, 80, 82, 84, 87, 88, 91, 92, 94, 97, 99, 101, 103, 106, 108, 111, 112, 114, 115, 119, 121, 125, 127, 128, 130, 132, 133, 135, 137
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2015

Keywords

Comments

Positions of strict descents in the sequence of differences between primes. Partial sums of A333215. - Gus Wiseman, Mar 24 2020

Examples

			The prime gaps split into the following maximal 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), ... Then a(n) is the n-th partial sum of the lengths of these subsequences. - _Gus Wiseman_, Mar 24 2020
		

Crossrefs

Partition of the positive integers: A064113, A258025, A258026;
Corresponding partition of the primes: A063535, A063535, A147812.
Adjacent terms differing by 1 correspond to strong prime quartets A054804.
The version for the Kolakoski sequence is A156242.
First differences are A333215 (if the first term is 0).
The version for strict ascents is A258025.
The version for weak ascents is A333230.
The version for weak descents is A333231.
Prime gaps are A001223.
Positions of adjacent equal prime gaps are A064113.
Weakly increasing runs of compositions in standard order are A124766.
Strictly decreasing runs of compositions in standard order are A124769.

Programs

  • Mathematica
    u = Table[Sign[Prime[n+2] - 2 Prime[n+1] + Prime[n]], {n, 1, 200}];
    Flatten[Position[u, 0]]   (* A064113 *)
    Flatten[Position[u, 1]]   (* A258025 *)
    Flatten[Position[u, -1]]  (* A258026 *)
    Accumulate[Length/@Split[Differences[Array[Prime,100]],LessEqual]]//Most (* Gus Wiseman, Mar 24 2020 *)
  • Python
    from itertools import count, islice
    from sympy import prime, nextprime
    def A258026_gen(startvalue=1): # generator of terms >= startvalue
        c = max(startvalue,1)
        p = prime(c)
        q = nextprime(p)
        r = nextprime(q)
        for k in count(c):
            if p+r<(q<<1):
                yield k
            p, q, r = q, r, nextprime(r)
    A258026_list = list(islice(A258026_gen(),20)) # Chai Wah Wu, Feb 27 2024

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)).

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

A156242 Bisection of A054353.

Original entry on oeis.org

3, 6, 9, 12, 15, 19, 21, 24, 27, 30, 33, 36, 39, 42, 45, 47, 50, 54, 57, 60, 63, 66, 69, 72, 75, 77, 81, 84, 87, 90, 93, 96, 100, 102, 105, 108, 111, 114, 117, 120, 123, 127, 129, 132, 136, 139, 142, 145, 147, 151, 154, 156, 159, 163, 166, 169, 172, 174, 177, 181
Offset: 1

Views

Author

Benoit Cloitre, Feb 07 2009

Keywords

Comments

Positions of strict descents in the Kolakoski sequence A000002. Strict ascents are A156243. - Gus Wiseman, Mar 31 2020

Crossrefs

The version for prime gaps is A258026.
Sizes of maximal weakly increasing subsequences of A000002 are A332875.

Programs

  • Mathematica
    kolagrow[q_]:=If[Length[q]<2,Take[{1,2},Length[q]+1],Append[q,Switch[{q[[Length[Split[q]]]],q[[-2]],Last[q]},{1,1,1},0,{1,1,2},1,{1,2,1},2,{1,2,2},0,{2,1,1},2,{2,1,2},2,{2,2,1},1,{2,2,2},1]]]
    kol[n_Integer]:=Nest[kolagrow,{1},n-1];
    Join@@Position[Partition[kol[100],2,1],{2,1}] (* Gus Wiseman, Mar 31 2020 *)

Formula

a(n) = A054353(2n).
A000002(a(n))=2 and A000002(a(n)+1)=1. - Jon Perry, Sep 04 2012

A054805 Second 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

37, 67, 97, 223, 277, 307, 457, 479, 613, 631, 719, 751, 853, 877, 929, 1087, 1297, 1423, 1447, 1471, 1543, 1657, 1663, 1693, 1733, 1777, 1783, 1847, 1861, 1867, 1987, 1993, 2053, 2137, 2333, 2371, 2377, 2459, 2467, 2503, 2521, 2531, 2579, 2609, 2647
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Second member of pairs of consecutive primes in A051634 (strong primes). - M. F. Hasler, Oct 27 2018

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(n) = nextprime(A054804(n))= prevprime(A054806(n)), nextprime = A151800, prevprime = A151799. - M. F. Hasler, Oct 27 2018

Extensions

Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021

A054807 Fourth 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

43, 73, 103, 229, 283, 313, 463, 491, 619, 643, 733, 761, 859, 883, 941, 1093, 1303, 1429, 1453, 1483, 1553, 1667, 1669, 1699, 1747, 1787, 1789, 1867, 1871, 1873, 1997, 1999, 2069, 2143, 2341, 2381, 2383, 2473, 2477, 2531, 2539, 2543, 2593, 2621, 2659
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(n) = nextprime(A054806(n)), nextprime = A151800. - M. F. Hasler, Oct 27 2018

Extensions

Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021.
Showing 1-10 of 26 results. Next