login
Where records occur in A239864.
3

%I #11 Mar 31 2019 03:42:55

%S 1,2,44,51,111,300,357,3603,3779,5326,5372,30817,117498,151450,166877,

%T 545114,5941303,14726486,16436691,17402909,32947955,77092704

%N Where records occur in A239864.

%C The record values are 1, 16, 22, 40, 54, 64, 90, 94, 112, 180, 184, 192, 202, 204, 256, 368, 388, 390, 418, 460, 472, 500, ... - _Amiram Eldar_, Mar 31 2019

%e It starts with a(1) = 1, that is for p_1 = 2 we have 1 in A239864.

%e Then a(2) = 2 because for p_2 = 3 we have 16 > 1.

%e Again a(3) = 44 because for p_44 = 193 we have 22 > 16. Etc.

%p P:=proc(q) local a, b, c, d, n, t; t:=0;

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

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

%p if a>t then t:=a; print(n); fi; od; end: P(10^6);

%t 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, 120000}]; s (* _Amiram Eldar_, Mar 31 2019 *)

%Y Cf. A000040, A239864, A239866, A239867.

%K nonn,more

%O 1,2

%A _Paolo P. Lava_, Mar 28 2014

%E a(13)-a(22) from _Amiram Eldar_, Mar 31 2019