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.

A217868 a(n) is the sum of total number of nonnegative integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order matters for the equation a^2+b^2 = n).

This page as a plain text file.
%I A217868 #25 Aug 11 2015 16:02:39
%S A217868 5,2,2,6,2,1,2,3,6,2,2,3,3,0,0,7,3,3,2,2,1,1,1,1,7,2,3,4,3,0,1,4,2,3,
%T A217868 0,7,4,1,1,2,3,0,3,2,2,0,0,3,6,4,2,5,3,2,0,1,3,2,1,0,3,0,2,8,4,2,3,3,
%U A217868 0,0,1,4,4,2,2,4,1,0,2,2,7,3,1,3,4,1,0,3,3,2,2,1,1,0,0,1,4,2,4,8
%N A217868 a(n) is the sum of total number of nonnegative integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order matters for the equation a^2+b^2 = n).
%C A217868 Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted separately.
%C A217868 The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
%C A217868 1, 2, 3, 7 are the first four numbers with class number 1.
%C A217868 a(n) = A217462(n) when n is not the sum of two positive squares.
%C A217868 But when n is the sum of two positive squares, the ordered pairs for the equation x^2+y^2 = n count.
%C A217868 For example,
%C A217868 193 = 12^2 + 7^2.
%C A217868 193 = 7^2 + 12^2.
%C A217868 193 = 11^2 + 2*6^2.
%C A217868 193 = 1^2 + 3*8^2.
%C A217868 193 = 9^2 + 7*4^2.
%C A217868 So a(193) = 5. On the other hand, for the sequence A217462, the ordered pairs 12^2 + 7^2, 7^2 + 12^2 will be counted only once, so A217462(193) = 4.
%D A217868 David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
%o A217868 (PARI) for(n=1, 100, sol=0; for(x=0, 100, if(issquare(n-x*x)&&n-x*x>=0, sol++); if(issquare(n-2*x*x)&&n-2*x*x>=0, sol++); if(issquare(n-3*x*x)&&n-3*x*x>=0, sol++); if(issquare(n-7*x*x)&&n-7*x*x>=0, sol++)); printf(sol", "))
%Y A217868 Cf. A216501, A216671.
%Y A217868 Cf. A217462 (related sequence of this when the order does not matter for the equation a^2 + b^2 = n).
%Y A217868 Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
%Y A217868 Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
%Y A217868 Cf. A000925 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted differently) with a >= 0, b >= 0).
%Y A217868 Cf. A216282 (number of solutions to n = a^2+2*b^2 with a >= 0, b >= 0).
%Y A217868 Cf. A119395 (number of solutions to n = a^2+3*b^2 with a >= 0, b >= 0).
%Y A217868 Cf. A216512 (number of solutions to n = a^2+7*b^2 with a >= 0, b >= 0).
%K A217868 nonn
%O A217868 1,1
%A A217868 _V. Raman_, Oct 13 2012