OFFSET
1,1
COMMENTS
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).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MAPLE
R:= 2, 19: p:= 19: count:= 1: q:= 19:
while count < 100 do
q:= nextprime(q);
if isprime((p+q)/2) and isprime((p^2+q^2)/2) then
R:= R, q; p:= q; count:= count+1;
fi
od:
R;
MATHEMATICA
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Aug 18 2023
STATUS
approved