login
A239867
Where records occur in A239866.
3
1, 9, 91, 205, 362, 519, 634, 1202, 3075, 11620, 19197, 32786, 67401, 67947, 473326, 587793, 1215895, 1361552, 1998403, 2532886, 3039732, 5138070, 7058483, 9465973, 20128072, 76214152
OFFSET
1,2
COMMENTS
The record values are 17, 40, 44, 58, 62, 68, 72, 106, 138, 144, 146, 190, 238, 240, 248, 258, 264, 290, 292, 340, 346, 348, 358, 378, 448, 452, ... - Amiram Eldar, Mar 31 2019
EXAMPLE
It starts with a(1) = 1, that is for p_1 = 2 we have 17 (in A239866)
Then a(2) = 9 because for p_9 = 23 we have 40 > 17.
Again a(3) = 91 because for p_91 = 467 we have 44 > 40. Etc.
MAPLE
P:=proc(q) local a, b, c, d, n, t; t:=0;
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;
if a>t then t:=a; print(n); fi; od; end: P(10^6);
MATHEMATICA
a[n_] := Module[{s = -1, k = 0, p = Prime[n]}, While[!PrimeQ[s], s += p; p = NextPrime[p]; k++]; k]; am = 0; s={}; Do[a1 = a[n]; If[a1 > am, am = a1; AppendTo[s, n]], {n, 1, 70000}]; s (* Amiram Eldar, Mar 31 2019 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Paolo P. Lava, Mar 28 2014
EXTENSIONS
a(12)-a(26) from Amiram Eldar, Mar 31 2019
STATUS
approved