login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333254 Lengths of maximal runs in the sequence of prime gaps (A001223). 11
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
Partial sums are A333214.
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:
R; # Robert Israel, Jan 06 2021
MATHEMATICA
Length/@Split[Differences[Array[Prime, 100]], #1==#2&]//Most
CROSSREFS
The version for A000002 is A000002. Similarly for A001462.
The unequal version is A333216.
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).
Prime gaps are A001223.
Positions of adjacent equal prime gaps are A064113.
Positions of adjacent unequal prime gaps are A333214.
Sequence in context: A043286 A172098 A353801 * A204162 A266227 A043285
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 20 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 06:22 EDT 2024. Contains 373540 sequences. (Running on oeis4.)