login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Least increasing sequence of primes such that a(n-1)^2 + a(n)^2 is semiprime, with a(1)=2.
1

%I #31 Aug 30 2023 11:39:33

%S 2,19,29,59,71,79,101,131,149,151,191,251,281,331,379,389,401,449,461,

%T 499,509,521,569,571,599,641,659,691,739,761,811,919,971,991,1009,

%U 1019,1129,1151,1259,1321,1409,1511,1531,1559,1579,1601,1621,1669,1699,1811,1901,1931,1979,1999,2081,2141

%N Least increasing sequence of primes such that a(n-1)^2 + a(n)^2 is semiprime, with a(1)=2.

%C For n >= 2, a(n) == 1 or 9 (mod 10) and a(n)^2 + a(n+1)^2 is twice a prime.

%H Robert Israel, <a href="/A365235/b365235.txt">Table of n, a(n) for n = 1..10000</a>

%e a(2) = 19 because a(1) = 2 and 2^2 + 19^2 = 365 = 5 * 73 is a semiprime.

%e a(3) = 29 because 19^2 + 29^2 = 1202 = 2*601 is a semiprime.

%p R:= 2,19: b:= 19^2: p:= 19: count:= 2:

%p while count < 100 do

%p p:= nextprime(p);

%p if isprime((b+p^2)/2) then

%p R:= R,p; count:= count+1; b:= p^2;

%p fi

%p od:

%p R;

%t p = 3; s = {q = 2}; Do[While[2 != PrimeOmega[q^2 + p^2], p = NextPrime[p]]; AppendTo[s, q = p], {100}];s

%Y Cf. A001358.

%K nonn

%O 1,1

%A _Zak Seidov_ and _Robert Israel_, Aug 28 2023