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

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

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 13, 14, 17, 20, 22, 23, 26, 28, 29, 31, 33, 35, 38, 41, 43, 45, 49, 50, 52, 57, 60, 61, 64, 65, 67, 69, 70, 71, 75, 76, 78, 79, 81, 83, 85, 86, 89, 90, 93, 95, 96, 98, 100, 104, 105, 109, 113, 116, 117, 120, 122, 123, 124, 126, 131, 134
Offset: 1

Views

Author

Clark Kimberling, Jun 02 2015

Keywords

Examples

			5 - 2*3 + 2 = 1, so a(1) = 5.
		

Crossrefs

Partition of the positive integers: A064113, A258025, A258026;
Corresponding partition of the primes: A063535, A063535, A147812.
Adjacent terms differing by 1 correspond to weak prime quartets A054819.
The version for the Kolakoski sequence is A156243.
The version for strict descents is A258026.
The version for weak ascents is A333230.
The version for weak descents is A333231.
First differences are A333212 (if the first term is 0).
Prime gaps are A001223.
Positions of adjacent equal prime gaps are A064113.
Weakly decreasing runs of compositions in standard order are A124765.
A triangle counting compositions by strict ascents is A238343.
Positions of adjacent unequal prime gaps are A333214.
Lengths of maximal anti-runs of prime gaps are A333216.

Programs

  • Mathematica
    u = Table[Sign[Prime[n+2] - 2 Prime[n+1] + Prime[n]], {n, 3, 200}];
    Flatten[Position[u, 0]]   (* A064113 *)
    Flatten[Position[u, 1]]   (* A258025 *)
    Flatten[Position[u, -1]]  (* A258026 *)
    Accumulate[Length/@Split[Differences[Array[Prime,100]],#1>=#2&]]//Most (* Gus Wiseman, Mar 25 2020 *)
    Position[Partition[Prime[Range[150]],3,1],?(#[[3]]-2#[[2]]+#[[1]]> 0&),1,Heads->False]//Flatten (* _Harvey P. Dale, Dec 25 2021 *)
  • PARI
    isok(k) = prime(k+2) - 2*prime(k+1) + prime(k) > 0; \\ Michel Marcus, Jun 03 2015
    
  • PARI
    is(n,p=prime(n))=my(q=nextprime(p+1),r=nextprime(q+1)); p + r > 2*q
    v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); v \\ Charles R Greathouse IV, Jun 03 2015
    
  • Python
    from itertools import count, islice
    from sympy import prime, nextprime
    def A258025_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)
    A258025_list = list(islice(A258025_gen(),20)) # Chai Wah Wu, Feb 27 2024

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

A333230 Positions of weak ascents in the sequence of differences between primes.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 10, 13, 14, 15, 17, 20, 22, 23, 26, 28, 29, 31, 33, 35, 36, 38, 39, 41, 43, 45, 46, 49, 50, 52, 54, 55, 57, 60, 61, 64, 65, 67, 69, 70, 71, 73, 75, 76, 78, 79, 81, 83, 85, 86, 89, 90, 93, 95, 96, 98, 100, 102, 104, 105, 107, 109, 110, 113
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

Comments

Partial sums of A333252.

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

Crossrefs

The version for the Kolakoski sequence is A022297.
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 descents is A333231.
First differences are A333252 (if the first term is 0).
Prime gaps are A001223.
Weakly decreasing runs of standard compositions are counted by A124765.
Weakly increasing runs of standard compositions are counted by A124766.
Strictly increasing runs of standard compositions are counted by A124768.
Strictly decreasing runs of standard compositions are counted by A124769.
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.

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

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

A376560 Points of upward concavity in the sequence of perfect-powers (A001597). Positives of A376559.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 46, 47, 48, 49, 50, 53, 54, 55, 57, 58, 60, 61, 62, 63, 64, 65, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2024

Keywords

Comments

These are points at which the second differences are positive.
Perfect-powers (A001597) are numbers with a proper integer root.
Note that, for some sources, upward concavity is negative curvature.

Examples

			The perfect powers (A001597) are:
  1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
  3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, ...
with first differences (A376559):
  1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, 2, ...
with positive positions (A376560):
  1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, ...
		

Crossrefs

The version for A000002 is A022297, complement A025505. See also A054354, A376604.
For first differences we have A053289, union A023055, firsts A376268, A376519.
For primes instead of perfect-powers we have A258025.
These are positions of positive terms in A376559.
For downward concavity we have A376561 (probably the complement).
A001597 lists the perfect-powers.
A064113 lists positions of adjacent equal prime gaps.
A333254 gives run-lengths of differences between consecutive primes.
Second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Maple
    N:= 10^6: # to use perfect powers <= N
    S:= {1,seq(seq(i^j,j=2..floor(log[i](N))),i=2..isqrt(N))}:
    L:= sort(convert(S,list)):
    DL:= L[2..-1]-L[1..-2]:
    D2L:= DL[2..-1]-DL[1..-2]:
    select(i -> D2L[i]>0, [$1..nops(D2L)]); # Robert Israel, Dec 01 2024
  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Join@@Position[Sign[Differences[Select[Range[1000],perpowQ],2]],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]]
Showing 1-10 of 32 results. Next