login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239866 Starting from any prime p_i (with i = 1, 2, 3 …) sequence lists the minimum number of consecutive primes that must be added minus 1 to reach another prime. 4
17, 1, 2, 2, 2, 2, 8, 2, 40, 2, 2, 4, 2, 2, 8, 4, 4, 2, 2, 6, 2, 4, 38, 4, 2, 4, 4, 10, 4, 2, 2, 6, 12, 8, 4, 2, 4, 38, 10, 8, 2, 4, 2, 2, 4, 2, 2, 2, 12, 2, 6, 2, 2, 4, 20, 8, 4, 2, 2, 2, 4, 2, 2, 8, 4, 2, 12, 2, 8, 2, 4, 16, 2, 2, 2, 22, 8, 2, 2, 2, 2, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

257 is the minimum prime that can be reached in two ways: adding 4 consecutive primes starting from 59 or 2 starting from 127 and deleting 1.

Other primes reachable in two ways: 389, 479, 491, 761, 863, 1319, 1847, 2131, 3037, 3299, etc.

239 is the minimum prime that can be reached in three ways: adding 8 consecutive primes starting from 17, 4 starting from 53 or 2 starting from 113 and deleting 1.

Other primes reachable in three ways: 24083, 32369, 34259, 40709, 49547, 51997, 60527, 66883, 69959, 75767, etc.

LINKS

Paolo P. Lava, Table of n, a(n) for n = 1..1000

EXAMPLE

a(1) = 17 because p_1 = 2 and we need to add other 16 consecutive primes minus 1 to reach another prime: 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 - 1 = 439.

a(2) = 1 because p_2 = 3 and 3 - 1 = 2 is prime.

a(3) = 2 because p_3 = 5 and 5 + 7 - 1 = 11 is prime. Etc.

MAPLE

P:=proc(q) local a, b, c, d, n;

for n from 1 to q do a:=1; b:=ithprime(n); c:=b; d:=b-1;

while not isprime(d) do a:=a+1; c:=nextprime(c); d:=d+c; od;

print(a); od; end: P(10^4);

CROSSREFS

Cf. A000040, A239864, A239865, A239867.

Sequence in context: A056110 A040296 A040297 * A040295 A040298 A040300

Adjacent sequences:  A239863 A239864 A239865 * A239867 A239868 A239869

KEYWORD

nonn

AUTHOR

Paolo P. Lava, Mar 28 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 17 10:59 EST 2019. Contains 320219 sequences. (Running on oeis4.)