This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A130761 #10 Jun 28 2020 19:21:20 %S A130761 3,5,7,11,13,19,29,31,37,41,43,53,59,61,67,71,79,83,97,107,127,139, %T A130761 149,157,179,181,191,197,227,229,239,251,263,283,293,307,347,349,353, %U A130761 373,419,439,443,463,467,479,499,523,541,569,601,607,613,617,619 %N A130761 Primes prime(n) such that at least one of the two numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 is prime. %H A130761 Robert Israel, <a href="/A130761/b130761.txt">Table of n, a(n) for n = 1..10000</a> %e A130761 (7^2 - 3^2)/2 - 1 is 19. Therefore 3 is in the sequence. %e A130761 (19^2 - 13^2)/2 + 1 is 97. Hence 13 is in the sequence. %p A130761 Res:= NULL: %p A130761 p:= 5: q:= 3: %p A130761 count:= 0: %p A130761 while count < 100 do %p A130761 r:= q; q:= p; p:= nextprime(p); %p A130761 v:= (p^2-r^2)/2; %p A130761 if isprime(v+1) or isprime(v-1) then %p A130761 count:= count+1; Res:= Res, r; %p A130761 fi %p A130761 od: %p A130761 Res; # _Robert Israel_, Oct 03 2018 %t A130761 Prime[Select[Range[140], PrimeQ[(Prime[ #+2]^2-Prime[ # ]^2)/2+1] || PrimeQ[(Prime[ # +2]^2-Prime[ # ]^2)/2-1] &]] %t A130761 Select[Partition[Prime[Range[200]],3,1],AnyTrue[(#[[3]]^2-#[[1]]^2)/2+{1,-1},PrimeQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 28 2020 *) %K A130761 nonn,less %O A130761 1,1 %A A130761 _J. M. Bergot_, Jul 13 2007 %E A130761 Edited and extended by _Stefan Steinerberger_, Jul 23 2007