|
|
A333254
|
|
Lengths of maximal runs in the sequence of prime gaps (A001223).
|
|
22
|
|
|
1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Prime gaps are differences between adjacent prime numbers.
Also lengths of maximal arithmetic progressions of consecutive primes.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The prime gaps split into the following runs: (1), (2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), (2), (6), (4), ...
|
|
MAPLE
|
p:= 3: t:= 1: R:= NULL: s:= 1: count:= 0:
for i from 2 while count < 100 do
q:= nextprime(p);
g:= q-p; p:= q;
if g = t then s:= s+1
else count:= count+1; R:= R, s; t:= g; s:= 1;
fi
od:
|
|
MATHEMATICA
|
Length/@Split[Differences[Array[Prime, 100]], #1==#2&]//Most
|
|
CROSSREFS
|
The weakly decreasing version is A333212.
The weakly increasing version is A333215.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
Positions of first appearances are A335406.
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.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|