login
Where records occur in A127356.
1

%I #9 Nov 12 2022 02:14:34

%S 1,2,3,10,13,77,92,152,294,484,517,964,1203,2876,14118,34279,81191,

%T 103862,115370,195097,334816,347938,2126572,2787194,3034023,5707120,

%U 16513290,17861702,19454321,206814544,500017558,551865394,716440254,891826049,1383516280

%N Where records occur in A127356.

%e The fifth record in A127356 is A129314(5) = 24 = A127356(13), hence a(5) = 13.

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime, nextprime, prime

%o def agen():

%o pn = 2; record = 1; yield 1

%o for n in count(2):

%o k, pn = 2, nextprime(pn)

%o while not isprime(pn + k*k): k += 2

%o if k > record: record = k; yield n

%o print(list(islice(agen(), 20))) # _Michael S. Branicky_, Nov 11 2022

%Y Cf. A127356, A129314 (records).

%K nonn

%O 1,2

%A _Klaus Brockhaus_, Apr 09 2007

%E a(27)-a(33) from _Donovan Johnson_, Dec 09 2008

%E a(34)-a(35) from _Michael S. Branicky_, Nov 11 2022