login
Lengths of runs of consecutive isolated primes beginning with A166251(n).
5

%I #27 Jul 08 2018 01:41:04

%S 2,1,1,1,3,2,1,1,2,1,1,1,3,2,1,1,3,2,1,2,1,2,1,4,3,2,1,1,1,2,1,1,2,1,

%T 1,2,1,1,2,1,1,1,1,2,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,2,1,4,3,2,1,1,2,

%U 1,1,1,1,2,1,2,1,2,1,1,1,1,3,2,1,2,1,1,2,1,2,1,3,2,1

%N Lengths of runs of consecutive isolated primes beginning with A166251(n).

%C Theorem. If the sequence is unbounded, then there exist arbitrarily long sequences of consecutive primes p_k, p_(k+1),...,p_m such that every interval (p_i/2, p_(i+1)/2), i=k,k+1,...,m-1, contains a prime.

%H Reinhard Zumkeller, <a href="/A182426/b182426.txt">Table of n, a(n) for n = 1..10000</a>

%H V. Shevelev, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL15/Shevelev/shevelev19.html">Ramanujan and Labos primes, their generalizations, and classifications of primes</a>, J. Integer Seq. 15 (2012) Article 12.5.4.

%H J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="http://arxiv.org/abs/1105.2249"> Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, J. Integer Seq. 14 (2011) Article 11.6.2.

%o (Haskell)

%o import Data.List (group)

%o a182426 n = a182426_list !! (n-1)

%o a182426_list = concatMap f $ group $ zipWith (-) (tail ips) ips where

%o f xs | head xs == 1 = reverse $ enumFromTo 2 $ length xs + 1

%o | otherwise = take (length xs) $ repeat 1

%o ips = map a049084 a166251_list

%o -- _Reinhard Zumkeller_, May 18 2012

%Y Cf. A166251, A182423, A182405, A164368, A194598.

%Y Cf. A049084.

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Apr 28 2012

%E Data corrected: a(49)=2.