%I #14 Aug 24 2023 10:17:09
%S 2,19,1459,1699,3079,3259,5419,5479,6079,6679,7219,8059,8719,11299,
%T 12619,13219,13399,15559,15679,18919,24379,25219,26839,34819,38239,
%U 39019,39799,40459,40759,42019,43399,44119,47059,47779,54559,55339,57139,60259,65479,65599,68659,69859,72559,77659,78439
%N Slowest increasing sequence of primes such that a(n - 1) + a(n) and a(n - 1)^2 + a(n)^2 are both semiprimes, with a(1)=2.
%C For n > 1, (a(n - 1) + a(n))/2 and (a(n - 1)^2 + a(n)^2)/2 are primes and a(n) == 19 (mod 60).
%H Robert Israel, <a href="/A365050/b365050.txt">Table of n, a(n) for n = 1..10000</a>
%e a(2) = 19 because 2+19=21=3*7 and 2^2+19^2=365=3*73 are semiprimes, and none of the primes from 3 to 17 works.
%p R:= 2,19: p:= 19: count:= 1: q:= 19:
%p while count < 100 do
%p q:= nextprime(q);
%p if isprime((p+q)/2) and isprime((p^2+q^2)/2) then
%p R:= R,q; p:= q; count:= count+1;
%p fi
%p od:
%p R;
%t s = {2}; p = 2; Do[q = NextPrime[p]; While[{2,2} != PrimeOmega[{p + q, p^2 + q^2}], q = NextPrime[q]]; AppendTo[s, p = q], {10}]; s
%Y Cf. A001358.
%K nonn
%O 1,1
%A _Zak Seidov_ and _Robert Israel_, Aug 18 2023