%I #7 Feb 06 2025 10:22:55
%S 3,5,7,11,13,17,19,23,29,37,41,43,53,61,67,73,89,97,103,109,137,139,
%T 163,167,179,181,191,197,199,227,239,241,251,257,263,269,277,281,283,
%U 293,307,313,331,353,359,367,379,397,409,419,421,431,433,443,449,463,479
%N Primes prime(k) such that at least one of the two numbers (prime(k+1)^2-prime(k)^2)/2 - 1 and (prime(k+1)^2-prime(k)^2)/2 + 1 is prime.
%e a(1)=3 because (5^2 - 3^2)/2 - 1 = 7 and (5^2 - 3^2)/2 + 1 = 9 (7 is prime),
%e a(2)=5 because (7^2 - 5^2)/2 - 1 = 11 and (7^2 - 5^2)/2 + 1 = 13 (11 and 13 are primes),
%e a(3)=7 because (11^2 - 7^2)/2 - 1 = 35 and (11^2 - 7^2)/2 + 1 = 37 (37 is prime), ...
%p ts_p3:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3(200);
%t Select[Prime[Range[94]],PrimeQ[(NextPrime[#]^2-#^2)/2-1]||PrimeQ[(NextPrime[#]^2-#^2)/2+1]&] (* _James C. McMahon_, Feb 05 2025 *)
%Y Cf. A130761.
%K nonn
%O 1,1
%A _Jani Melik_, Aug 01 2007