The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216673 Total number of solutions to the equation x^2 + k*y^2 = n with x >= 0, y >= 0, k > 0, or 0 if the number is infinite. (Order does not matter for the equation x^2 + y^2 = n). 5

%I #17 May 01 2013 16:06:53

%S 0,2,2,0,3,3,3,5,0,4,4,6,6,4,4,0,7,7,6,8,7,6,5,8,0,6,8,10,9,6,7,11,10,

%T 8,6,0,11,7,7,12,12,7,9,11,13,8,7,13,0,10,9,16,12,12,9,12,14,10,9,12,

%U 15,8,11,0,15,10,11,16,13,11,9,19,18,10,11,18,13

%N Total number of solutions to the equation x^2 + k*y^2 = n with x >= 0, y >= 0, k > 0, or 0 if the number is infinite. (Order does not matter for the equation x^2 + y^2 = n).

%C If the equation x^2+y^2 = n has got two solutions (x, y), (y, x) then they will be counted only once.

%C No solutions can exist for the values of k > n.

%C This sequence differs from A216504, since this sequence gives the total number of solutions to the equation x^2+k*y^2 = n, whereas the sequence A216504 gives the number of distinct values of k for which a solution to the equation x^2+k*y^2 = n can exist.

%C Some values of k can clearly have more than one solution.

%C For example, x^2+k*y^2 = 33 is satisfiable for

%C 33 = 1^2+2*4^2.

%C 33 = 5^2+2*2^2.

%C 33 = 3^2+6*2^2.

%C 33 = 1^2+8*2^2.

%C 33 = 5^2+8*1^2.

%C 33 = 4^2+17*1^2.

%C 33 = 3^2+24*1^2.

%C 33 = 2^2+29*1^2.

%C 33 = 1^2+32*1^2.

%C 33 = 0^2+33*1^2.

%C So for this sequence a(33) = 10.

%C On the other hand, for A216504, there exist only 7 different values of k for which a solution to the equation mentioned above exists.

%C So A216504(33) = 8.

%o (PARI) for(n=1, 100, sol=0; for(k=1, n, for(x=0, n, if((issquare(n-k*x*x)&&n-k*x*x>=0&&k>=2)||(issquare(n-x*x)&&n-x*x>=0&&k==1&&x*x<=n-x*x), sol++))); if(issquare(n),print1(0", "),print1(sol", "))) /* _V. Raman_, Oct 16 2012 */

%Y Cf. A216503, A216504, A216505.

%Y Cf. A217840 (a variant of this sequence, when the order does matter for the equation x^2+y^2 = n, i.e. if the equation x^2+y^2 = n has got two solutions (x, y), (y, x) then they will be counted separately).

%Y Cf. A216672, A216674, A217834, A217840, A217956.

%K nonn

%O 1,2

%A _V. Raman_, Sep 13 2012

%E Ambiguity in name corrected by _V. Raman_, Oct 16 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 16:59 EDT 2024. Contains 372533 sequences. (Running on oeis4.)