OFFSET
0,14
COMMENTS
Also, number of primes p such that n - p^2 is a semiprime. - M. F. Hasler, Apr 11 2026
EXAMPLE
a(8) = 1 counts the triple (2, 2, 2): 8 = 2^2 + 2*2.
a(10) = 1 counts the triple (2, 2, 3): 10 = 2^2 + 2*3.
a(13) = 2 counts the triples (2, 3, 3) and (3, 2, 2): 13 = 2^2 + 3*3 = 3^2 + 2*2.
MATHEMATICA
t[n_, c_] := Module[{r}, r = Flatten[Table[If[n - x^2 <= 0, {},
Map[({x, #, Quotient[n - x^2, #]} &),
Select[Divisors[n - x^2], Divisible[n - x^2, #] &]]], {x, 1,
Floor[Sqrt[n - 1]]}], 1]; Select[r, Apply[c, #] &]];
c = (PrimeQ[#1] && PrimeQ[#2] && PrimeQ[#3] && #2 <= #3 &); Table[{n, t[n, c]}, {n, 1, 30}]
Join[{0}, Table[Length[t[n, c]], {n, 1, 130}]]
(* Peter J. C. Moses, Mar 29 2026 *)
PROG
(PARI) apply( {A394741(n, c=0)=n>6&&forprime(p=2, sqrtint(n-4), bigomega(n-p^2)==2 && c++); c}, [0..99])
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 09 2026
STATUS
approved
