# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a239867 Showing 1-1 of 1 %I A239867 #13 Mar 31 2019 03:43:09 %S A239867 1,9,91,205,362,519,634,1202,3075,11620,19197,32786,67401,67947, %T A239867 473326,587793,1215895,1361552,1998403,2532886,3039732,5138070, %U A239867 7058483,9465973,20128072,76214152 %N A239867 Where records occur in A239866. %C A239867 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 %e A239867 It starts with a(1) = 1, that is for p_1 = 2 we have 17 (in A239866) %e A239867 Then a(2) = 9 because for p_9 = 23 we have 40 > 17. %e A239867 Again a(3) = 91 because for p_91 = 467 we have 44 > 40. Etc. %p A239867 P:=proc(q) local a, b, c, d, n, t; t:=0; %p A239867 for n from 1 to q do a:=1; b:=ithprime(n); c:=b; d:=b-1; %p A239867 while not isprime(d) do a:=a+1; c:=nextprime(c); d:=d+c; od; %p A239867 if a>t then t:=a; print(n); fi; od; end: P(10^6); %t A239867 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 *) %Y A239867 Cf. A000040, A239864, A239865, A239866. %K A239867 nonn,more %O A239867 1,2 %A A239867 _Paolo P. Lava_, Mar 28 2014 %E A239867 a(12)-a(26) from _Amiram Eldar_, Mar 31 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE