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!)
A342877 a(n) = 1 if the average distance between consecutive first n primes is greater than that of the first n-1 primes, otherwise a(n) = 0, for n > 2. 1
1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
The average distance between consecutive primes among the first n primes tends to increase with n. This average distance always changes when n is increased to n + 1, but it seems that most of the times this distance decreases. See a log-linear scatter plot of (1/n) Sum_{i=1..n} a(i) in Links.
Conjecture: lim_{n->infinity} (1/n) Sum_{i=1..n} a(i) < 1/2.
In support of the conjecture: If it is assumed, as an approximation, that position of primes follows a Poisson point process then the distance between consecutive primes is a stochastic variable with exponential probability distribution function. The probability that an exponentially distributed stochastic variable takes a value larger than the mean value is about 0.367879.
LINKS
Yamasaki, Yasuo and Yamasaki, Aiichi, On the Gap Distribution of Prime Numbers, 数理解析研究所講究録 (1994), 887: 151-168.
EXAMPLE
a(3) = 1 because the average distance between consecutive first three primes {2,3,5} is (5 - 2)/2 = 3/2 which is greater than the average distance between consecutive first two primes {2,3} which is (3-2)/1 = 1.
a(6)=0 because the average distance between consecutive first six primes {2,3,5,7,11,13} is (13 - 2)/5 = 11/5 which is smaller than the average distance between consecutive first five primes {2,3,5,7,11} which is (11 - 2)/4 = 9/4.
MATHEMATICA
a={}; nmax=128;
Do[If[(Prime[n]-2)/(n-1)>(Prime[n-1]-2)/(n-2), AppendTo[a, 1], AppendTo[a, 0]], {n, 3, nmax}];
a
(* Uncomment and run next lines to produce the log-linear plot available in Links *)
(* a={};
nmax=2^18;
Do[If[(Prime[n]-2)/(n-1)>(Prime[n-1]-2)/(n-2), AppendTo[a, {n, 1}], AppendTo[a, {n, 0}]], {n, 3, nmax}];
ListLogLinearPlot[Transpose[{Range[3, nmax], Accumulate[Transpose[a][[2]]]/Range[3, nmax]}], Frame->True, PlotRange->{All, {0.25, 0.75}}, PlotLabel->Text[Style["Sum_{i=1..n} a(i)/n", FontSize->16]],
FrameLabel->{Text[Style["n", FontSize->16]], }, PlotStyle->{PointSize->Small, Red}, GridLines->Automatic] *)
PROG
(PARI) A342877(n) = (((prime(n)-2)/(n-1)) > ((prime(n-1)-2)/(n-2))); \\ Antti Karttunen, Mar 28 2021
CROSSREFS
Sequence in context: A342653 A189166 A092079 * A140074 A351957 A342004
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Mar 28 2021
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 July 18 21:02 EDT 2024. Contains 374388 sequences. (Running on oeis4.)