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 A356864 #12 Sep 06 2022 10:29:20 %S A356864 0,0,0,1,1,1,1,1,1,1,2,1,0,0,3,0,2,3,0,3,4,1,1,2,1,2,3,0,0,3,1,3,1,0, %T A356864 5,3,0,2,1,0,3,6,0,1,2,1,1,3,0,2,2,0,2,1,1,4,6,0,2,11,0,3,3,0,2,2,0,0, %U A356864 2,0,4,4,0,1,3,1,5,3,0,2,8,0,2,3,0,1,5,0,0,6,1,4,5,0,3,4,0,3,1 %N A356864 a(n) is the number of primes p < n such that 2*n-p and p*(2*n-p)+2*n are also prime. %C A356864 a(n) is the number of k such that n-k, n+k and n^2+2*n-k^2 are all prime. %C A356864 If n == 1 (mod 3) then a(n) <= 1, as the only possible p is 3. %H A356864 Robert Israel, <a href="/A356864/b356864.txt">Table of n, a(n) for n = 1..10000</a> %e A356864 a(11) = 2 because 3, 22-3 = 19 and 3*19+22 = 79, and 5, 22-5 = 17 and 5*17+22 = 107 are all prime. %p A356864 f:= proc(m) local p,q,t; %p A356864 p:= 1: t:= 0: %p A356864 do %p A356864 p:= nextprime(p); %p A356864 q:= n-p; %p A356864 if q <= p then return t fi; %p A356864 if isprime(q) and isprime(p*q+m) then t:= t+1 fi; %p A356864 od %p A356864 end proc: %p A356864 map(f, 2*[$1..100]); %t A356864 a[n_] := Count[Range[n - 1], _?(AllTrue[{#, 2*n - #, #*(2*n - #) + 2*n}, PrimeQ] &)]; Array[a, 100] (* _Amiram Eldar_, Sep 01 2022 *) %Y A356864 Cf. A061357. %K A356864 nonn %O A356864 1,11 %A A356864 _J. M. Bergot_ and _Robert Israel_, Sep 01 2022