%I #15 Apr 17 2026 17:17:20
%S 0,0,0,0,0,0,0,0,1,0,1,0,0,2,1,1,0,0,2,2,0,0,0,1,1,1,1,0,0,2,2,2,0,0,
%T 2,2,0,1,1,2,1,0,2,2,1,0,1,2,1,0,2,1,0,2,0,3,0,0,3,3,2,1,1,2,3,0,2,1,
%U 0,1,1,3,0,1,3,1,1,0,2,0,1,1,2,3,1,0,2,2,1,1,2,2,0,0,2,3,1,1
%N a(n) = number of triples (x, y, z) such that x^2 + y*z = n, where x, y, z are primes, not necessarily distinct, and y <= z.
%C Also, number of primes p such that n - p^2 is a semiprime. - _M. F. Hasler_, Apr 11 2026
%e a(8) = 1 counts the triple (2, 2, 2): 8 = 2^2 + 2*2.
%e a(10) = 1 counts the triple (2, 2, 3): 10 = 2^2 + 2*3.
%e a(13) = 2 counts the triples (2, 3, 3) and (3, 2, 2): 13 = 2^2 + 3*3 = 3^2 + 2*2.
%t t[n_, c_] := Module[{r}, r = Flatten[Table[If[n - x^2 <= 0, {},
%t Map[({x, #, Quotient[n - x^2, #]} &),
%t Select[Divisors[n - x^2], Divisible[n - x^2, #] &]]], {x, 1,
%t Floor[Sqrt[n - 1]]}], 1]; Select[r, Apply[c, #] &]];
%t c = (PrimeQ[#1] && PrimeQ[#2] && PrimeQ[#3] && #2 <= #3 &); Table[{n, t[n, c]}, {n, 1, 30}]
%t Join[{0}, Table[Length[t[n, c]], {n, 1, 130}]]
%t (* _Peter J. C. Moses_, Mar 29 2026 *)
%o (PARI) apply( {A394741(n, c=0)=n>6&&forprime(p=2, sqrtint(n-4), bigomega(n-p^2)==2 && c++); c}, [0..99])
%Y Cf. A393710, A394740, A394742, A395255.
%K nonn
%O 0,14
%A _Clark Kimberling_, Apr 09 2026