OFFSET
1,2
COMMENTS
Positions of first appearances in A373819.
EXAMPLE
The runs of odd primes differing by 2 begin:
3 5 7
11 13
17 19
23
29 31
37
41 43
47
53
59 61
67
71 73
79
with lengths:
3, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, ...
which have runs beginning:
3
2 2
1
2
1
2
1 1
2
1
2
1 1 1 1
2 2
1 1 1
with lengths:
1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 4, 2, 3, 2, 4, 3, ...
with positions of first appearances a(n).
MATHEMATICA
t=Length/@Split[Length/@Split[Select[Range[3, 10000], PrimeQ], #1+2==#2&]//Most]//Most;
spna[y_]:=Max@@Select[Range[Length[y]], SubsetQ[t, Range[#1]]&];
Table[Position[t, k][[1, 1]], {k, spna[t]}]
CROSSREFS
For antiruns we have A373827 (sorted A373826), firsts of A373820, run-lengths of A027833 (partial sums A029707, firsts A373401, sorted A373402).
The sorted version is A373824.
A000040 lists the primes.
A001223 gives differences of consecutive primes (firsts A073051), run-lengths A333254 (firsts A335406), run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 21 2024
STATUS
approved