OFFSET
0,20
COMMENTS
Also, number of primes p not dividing n such that n - p^2 is a semiprime but not a square. - M. F. Hasler, Apr 11 2026
EXAMPLE
a(19) = 2 counts these triples: (2, 3, 5), (3, 2, 5).
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 &&
DuplicateFreeQ[{#1, #2, #3}] &);
Join[{0}, Table[Length[t[n, c]], {n, 1, 130}]]
(* Peter J. C. Moses, Mar 29 2026 *)
PROG
(PARI) apply( {A394740(n, c=0)=n>6&&forprime(p=2, sqrtint(n-6), n%p&& bigomega(n-p^2)==2 &&!issquare(n-p^2)&&c++); c}, [0..99])
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 09 2026
STATUS
approved
