login
A394746
a(n) = number of triples (x, y, z) such that x^2 + y*z = n, where x,y,z are positive integers satisfying x <= y <= z.
6
0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 3, 2, 2, 4, 2, 2, 4, 3, 3, 4, 3, 4, 4, 2, 4, 6, 3, 3, 5, 5, 3, 5, 4, 5, 6, 2, 6, 7, 2, 5, 7, 6, 3, 5, 6, 6, 7, 2, 5, 9, 4, 6, 8, 5, 5, 6, 6, 7, 7, 4, 7, 10, 2, 4, 11, 8, 5, 7, 5, 8, 7, 5, 8, 10, 6, 5, 11, 4, 5, 10, 6, 12, 7, 2
OFFSET
0,6
LINKS
EXAMPLE
a(10) = 3 counts these triples: (1, 1, 9), (1, 3, 3), (2, 2, 3).
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 = (#1 <= #2 <= #3 &);
Join[{0}, Table[Length[t[n, c]], {n, 1, 130}]]
(* Peter J. C. Moses, Mar 29 2026 *)
(* Alternative: *)
Join[{0}, Table[Sum[Length@Select[Divisors[n-x^2], x<=#<=(n-x^2)/#&], {x, 1, Floor[Sqrt[n-1]]}], {n, 1, 100}]] (* Vincenzo Librandi, Apr 23 2026 *)
PROG
(Magma) a := function(n) c := 0; for x in [1..Floor(Sqrt(n))] do m := n - x^2; if m gt 0 then
c +:= #[d : d in Divisors(m) | d ge x and d le m div d]; end if; end for; return c; end function; [a(n) : n in [0..100]]; // Vincenzo Librandi, Apr 23 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 15 2026
STATUS
approved