login
Search: a054804 -id:a054804
     Sort: relevance | references | number | modified | created      Format: long | short | data
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).
+10
41
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,1
LINKS
FORMULA
a(n) = nextprime(A054839), nextprime = A151800;
A054840 = { A054833(n) | A054833(n) = nextprime(A054833(n-1)) }. - M. F. Hasler, Oct 27 2018
MATHEMATICA
Select[Partition[Prime[Range[50000]], 7, 1], Min[Differences[#, 2]]>0&][[;; , 7]] (* Harvey P. Dale, Aug 25 2024 *)
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.
KEYWORD
nonn
AUTHOR
Henry Bottomley, Apr 10 2000
EXTENSIONS
Edited and more terms from M. F. Hasler, Oct 27 2018
STATUS
approved
Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) < 0.
+10
28
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,1
COMMENTS
Positions of strict descents in the sequence of differences between primes. Partial sums of A333215. - Gus Wiseman, Mar 24 2020
EXAMPLE
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
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 *)
PROG
(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
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.
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2015
STATUS
approved
Lengths of maximal weakly increasing subsequences in the sequence of prime gaps (A001223).
+10
16
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,1
COMMENTS
Prime gaps are differences between adjacent prime numbers.
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)).
EXAMPLE
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), ...
MATHEMATICA
Length/@Split[Differences[Array[Prime, 100]], #1<=#2&]//Most
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 14 2020
STATUS
approved
First index of weakly increasing prime quartets.
+10
9
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,2
COMMENTS
Let g(i) = prime(i + 1) - prime(i). These are numbers k such that g(k) <= g(k + 1) <= g(k + 2).
EXAMPLE
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.
MATHEMATICA
ReplaceList[Array[Prime, 100], {___, x_, y_, z_, t_, ___}/; y-x<=z-y<=t-z:>PrimePi[x]]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 14 2020
STATUS
approved
First index of unequal prime quartets.
+10
9
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,1
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.
EXAMPLE
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.
MATHEMATICA
ReplaceList[Array[Prime, 100], {___, x_, y_, z_, t_, ___}/; y-x!=z-y!=t-z:>PrimePi[x]]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 15 2020
STATUS
approved
First index of partially unequal prime quartets.
+10
9
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,1
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).
EXAMPLE
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
MATHEMATICA
ReplaceList[Array[Prime, 100], {___, x_, y_, z_, t_, ___}/; y-x!=z-y&&z-y!=t-z:>PrimePi[x]]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 15 2020
STATUS
approved
First index of weakly decreasing prime quartets.
+10
8
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,1
COMMENTS
Let g(i) = prime(i + 1) - prime(i). These are numbers k such that g(k) >= g(k + 1) >= g(k + 2).
EXAMPLE
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.
MATHEMATICA
ReplaceList[Array[Prime, 100], {___, x_, y_, z_, t_, ___}/; y-x>=z-y>=t-z:>PrimePi[x]]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 15 2020
STATUS
approved
Bisection of A054353.
+10
6
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,1
COMMENTS
Positions of strict descents in the Kolakoski sequence A000002. Strict ascents are A156243. - 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
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 *)
CROSSREFS
The version for prime gaps is A258026.
Sizes of maximal weakly increasing subsequences of A000002 are A332875.
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 07 2009
STATUS
approved
Second term of strong prime quartets: prime(m+1)-prime(m) > prime(m+2)-prime(m+1) > prime(m+3)-prime(m+2)..
+10
5
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,1
COMMENTS
Second member of pairs of consecutive primes in A051634 (strong primes). - M. F. Hasler, Oct 27 2018
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..10000, Oct 27 2018
FORMULA
a(n) = nextprime(A054804(n))= prevprime(A054806(n)), nextprime = A151800, prevprime = A151799. - 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.
KEYWORD
nonn
AUTHOR
Henry Bottomley, Apr 10 2000
EXTENSIONS
Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021
STATUS
approved
Fourth term of strong prime quartets: prime(m+1)-prime(m) > prime(m+2)-prime(m+1) > prime(m+3)-prime(m+2).
+10
5
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,1
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..10000, Oct 27 2018
FORMULA
a(n) = nextprime(A054806(n)), nextprime = A151800. - M. F. Hasler, Oct 27 2018
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.
KEYWORD
nonn
AUTHOR
Henry Bottomley, Apr 10 2000
EXTENSIONS
Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021.
STATUS
approved

Search completed in 0.050 seconds