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!)
A217956 Total number of solutions to the equation x^2+k*y^2 = n with x > 0, y > 0, k >= 0, or 0 if infinite. (Order matters for the equation x^2+y^2 = n). 5
0, 1, 1, 0, 3, 2, 2, 3, 0, 4, 3, 4, 6, 3, 3, 0, 7, 5, 5, 7, 6, 5, 4, 6, 0, 6, 6, 8, 9, 5, 6, 8, 9, 8, 5, 0, 11, 6, 6, 11, 12, 6, 8, 9, 12, 7, 6, 10, 0, 9, 8, 15, 12, 10, 8, 10, 13, 10, 8, 10, 15, 7, 9, 0, 16, 9, 10, 15, 12, 10, 8, 15, 18, 10, 9, 16, 12, 8, 11, 15, 0, 12, 9, 16, 19, 10, 9, 16, 18, 13, 12, 13, 14, 11, 9, 15, 21, 10, 14, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
If the equation x^2+y^2 = n has two solutions (x, y), (y, x) then they will be counted differently.
No solutions can exist for the values of k >= n.
a(n) is the same as A216674(n) when n is not the sum of two positive squares.
But when n is the sum of two positive squares, the ordered pairs for the equation x^2+y^2 = n count.
For example,
10 = 3^2 + 1^2.
10 = 1^2 + 3^2.
10 = 2^2 + 6*1^2.
10 = 1^2 + 9*1^2.
So a(10) = 4. On the other hand, for the sequence A216674, the ordered pair 3^2+1^2 and 1^2+3^2 will be counted as the same, and so A216674(10) = 3.
LINKS
PROG
(PARI) for(n=1, 100, sol=0; for(k=0, n, for(x=1, n, if((issquare(n-k*x*x)&&n-k*x*x>0), sol++))); if(issquare(n), print1(0", "), print1(sol", "))) /* V. Raman, Oct 16 2012 */
CROSSREFS
Cf. A216674 (a variant of this sequence, when the order does not 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 as the same).
Sequence in context: A073756 A328829 A006379 * A105198 A133882 A092106
KEYWORD
nonn
AUTHOR
V. Raman, Oct 16 2012
STATUS
approved

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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)