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.

A216503 a(n) = number of positive integers k such that n = x^2 + k*y^2 has a solution with x>0, y>0.

This page as a plain text file.
%I A216503 #13 Oct 16 2012 11:28:15
%S A216503 0,1,1,1,2,2,2,3,3,3,3,4,5,3,3,4,6,5,5,5,5,5,4,6,7,5,5,6,8,5,6,7,7,7,
%T A216503 5,9,10,6,6,9,11,6,8,9,10,7,6,10,11,7,7,11,11,8,7,10,11,9,8,9,14,7,9,
%U A216503 10,11,8,10,13,11,9,8,15,17,9,9,14,11,8,11,12,14
%N A216503 a(n) = number of positive integers k such that n = x^2 + k*y^2 has a solution with x>0, y>0.
%H A216503 T. D. Noe, <a href="/A216503/b216503.txt">Table of n, a(n) for n = 1..1000</a>
%e A216503 a(17) = 6 because
%e A216503 17 = 4^2 + 1*1^2.
%e A216503 17 = 3^2 + 2*2^2.
%e A216503 17 = 1^2 + 4*2^2.
%e A216503 17 = 3^2 + 8*1^2.
%e A216503 17 = 2^2 + 13*1^2.
%e A216503 17 = 1^2 + 16*1^2.
%e A216503 Therefore there are 6 different values of k for which 17 can be written in the form a^2 + k*b^2.
%t A216503 Table[cnt = 0; Do[b = 1; found = False; While[q = n - k*b^2; ! found && q > 0, If[IntegerQ[Sqrt[q]], cnt++; found = True]; b++], {k, n}]; cnt, {n, 100}] (* _T. D. Noe_, Sep 11 2012 *)
%o A216503 (PARI) for(n=1, 100, sol=0; for(k=1, n-1, for(x=1, n, if(issquare(n-k*x*x)&&n-k*x*x>0, sol++; break))); print1(sol", ")) /* _V. Raman_, Oct 16 2012 */
%Y A216503 Cf. A001481, A154777, A092572.
%K A216503 nonn
%O A216503 1,5
%A A216503 _V. Raman_, Sep 07 2012