cp's OEIS Frontend

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.

A297968 Number of solutions to x*y*(x+y)=n in coprime integers.

This page as a plain text file.
%I A297968 #20 Apr 29 2019 07:05:30
%S A297968 0,4,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,12,0,0,0,0,
%T A297968 0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,
%U A297968 0,6,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0
%N A297968 Number of solutions to x*y*(x+y)=n in coprime integers.
%C A297968 a(n)=0 if n is odd. - _Robert Israel_, Jan 10 2018
%H A297968 Robert Israel, <a href="/A297968/b297968.txt">Table of n, a(n) for n = 1..10000</a>
%H A297968 C. L. Stewart, <a href="https://doi.org/10.1090/S0894-0347-1991-1119199-X">On the number of solutions of polynomial congruences and Thue equations</a>, J. Amer. Math. Soc. 4 (1991), 793-835.
%H A297968 S. Y. Xiao et al, <a href="https://mathoverflow.net/questions/290299">Integers h such that xy(x+y)=h has many integer solutions</a>, Math Overflow
%e A297968 For n=6 the a(n)=6 solutions are (x,y) = (-3,1), (-3,2), (1,-3), (1,2), (2,1) and (2,-3).
%p A297968 f:= proc(n) local d,count,x,s,ys;
%p A297968   d:= numtheory:-divisors(n);
%p A297968   count:= 0:
%p A297968   for x in d union map(`-`,d) do
%p A297968     if issqr(x^4+4*n*x) then
%p A297968       s:= sqrt(x^4+4*n*x);
%p A297968       ys:= select(t -> type(t,integer) and igcd(t,x)=1, [-(s+x^2)/(2*x), (x^2-s)/(2*x)]);
%p A297968       count:= count + nops(ys);
%p A297968     fi
%p A297968   od;
%p A297968   count
%p A297968 end proc:
%p A297968 map(f, [$1..200]);
%t A297968 f[n_] := Module[{d, count, x, s, ys}, d = Divisors[n]; count = 0; Do[If[ IntegerQ[Sqrt[x^4 + 4n x]], s = Sqrt[x^4 + 4n x]; ys = Select[{-(s+x^2)/ (2x), (x^2-s)/(2x)}, IntegerQ[#] && GCD[#, x] == 1&]; count = count + Length[ys]], {x, Union[d, -d]}]; count]; Array[f, 200] (* _Jean-François Alcover_, Apr 29 2019, after _Robert Israel_ *)
%K A297968 nonn
%O A297968 1,2
%A A297968 _Robert Israel_, Jan 10 2018