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

Let A_n defined in the same way as A159559, but with initial term prime(n); a(n) is the smallest number m such that A_(n+1)(m) - A_n(m) > 6 or a(n)=0 if there is no such m.

1

`%I #35 Nov 14 2016 13:11:26
`

`%S 0,13,0,0,9,0,0,13,0,15,0,9,0,0,11,0,17,13,11,7,5,3,2,0,11,7,5,3,2,7,
`

`%T 5,3,2,15,0,9,0,7,5,3,2,7,5,3,2,2,9,0,7,5,3,2,0,0,11,0,7,5,3,2,2,7,5,
`

`%U 3,2,3,2,7,5,3,2,11,7,5,3,2,3,2,2,3,2,11,7
`

`%N Let A_n defined in the same way as A159559, but with initial term prime(n); a(n) is the smallest number m such that A_(n+1)(m) - A_n(m) > 6 or a(n)=0 if there is no such m.
`

`%C A277118 is a subsequence. In contrast to A277118, the sequence contains some terms greater than 17. The first occurrence for 19 is n = 7061; the first occurrence for 21 is n = 214612 and the first occurrence for 23 is n = 30572.
`

`%H Peter J. C. Moses, <a href="/A277255/b277255.txt">Table of n, a(n) for n = 2..5001</a>
`

`%H Vladimir Shevelev, Peter J. C. Moses, <a href="https://arxiv.org/abs/1610.03385">Constellations of primes generated by twin primes</a>, arXiv:1610.03385 [math.NT], 2016.
`

`%F a(n)=2 if and only if prime(n+1) - prime(n) >=8.
`

`%Y Cf. A159559, A277118.
`

`%K nonn
`

`%O 2,2
`

`%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Oct 22 2016
`