An Elegant Way To Define A Sequence


Answer :

I believe your sequence continues forever but grows quickly. If nn is large, the density of primes around nn is logn\log n. Since logn\log n is so much smaller than nn, the chance a random nn has kk arrows is about 1(logn)k+1\frac 1{(\log n)^{k+1}}. The expected number of sequences of length kk above 1012,10^{12}, say, is then 1012dn(logn)k+1\int_{10^{12}}^\infty \frac {dn}{(\log n)^{k+1}}. This diverges because (logn)k(\log n)^k becomes less than nn for nn large enough and we know the integral of 1n\frac 1n diverges. Each subtraction is only of order nlogn\frac n{\log n}, which is small compared to nn and the log will not change much.

If we ask what length of sequence we expect to find among the 1212 digit numbers, we note that the log of these numbers is about 2929 and that 298.53101229^{8.5} \approx 3\cdot 10^{12}. We would expect to find some sequences of 77 arrows, maybe 88 or 99, and be surprised at 1010 or more. For 100100 digit numbers, the log is about 231231 and 23142.5310100231^{42.5} \approx 3\cdot 10^{100}, so we would expect some sequences of length 4040 or 4141 among the 100100 digit numbers.


`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)` 

produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?