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.

A217463 a(n) is the sum of total number of positive 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 does not matter for the equation a^2+b^2 = n).

This page as a plain text file.
%I A217463 #26 Feb 16 2024 06:32:05
%S A217463 0,1,1,1,1,1,1,2,1,1,2,2,2,0,0,2,2,2,2,1,1,1,1,1,1,1,2,3,2,0,1,3,2,2,
%T A217463 0,2,3,1,1,1,2,0,3,2,1,0,0,2,1,2,2,4,2,2,0,1,3,1,1,0,2,0,1,3,2,2,3,2,
%U A217463 0,0,1,3,3,1,1,4,1,0,2,1,2,2,1,3,2,1,0,3,2,1,2,1,1,0,0,1,3,1,4,2
%N A217463 a(n) is the sum of total number of positive 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 does not matter for the equation a^2+b^2 = n).
%C A217463 Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted only once.
%C A217463 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 A217463 1, 2, 3, 7 are the first four numbers, with the class number 1.
%C A217463 "If a composite number C is of the form a^2 + kb^2 for some integers a & b, then every prime factor of C raised to an odd power is of the form c^2 + kd^2 for some integers c & d."
%C A217463 This statement is only true for k = 1, 2, 3.
%C A217463 For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
%C A217463 A number can be written as a^2 + b^2 if and only if it has no prime factor congruent to 3 (mod 4) raised to an odd power.
%C A217463 A number can be written as a^2 + 2b^2 if and only if it has no prime factor congruent to 5 (mod 8) or 7 (mod 8) raised to an odd power.
%C A217463 A number can be written as a^2 + 3b^2 if and only if it has no prime factor congruent to 2 (mod 3) raised to an odd power.
%C A217463 A number can be written as a^2 + 7b^2 if and only if it has no prime factor congruent to 3 (mod 7) or 5 (mod 7) or 6 (mod 7) raised to an odd power, and the exponent of 2 is not 1.
%D A217463 David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
%o A217463 (PARI) for(n=1,100,sol=0;for(x=1,100,if(issquare(n-x*x)&&n-x*x>0&&x*x<=n-x*x,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 A217463 Cf. A216501, A216671.
%Y A217463 Cf. A217869 (related sequence of this when the order does matter for the equation a^2 + b^2 = n).
%Y A217463 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 A217463 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 A217463 Cf. A025426 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted as the same) with a > 0, b > 0).
%Y A217463 Cf. A216278 (number of solutions to n = a^2+2*b^2 with a > 0, b > 0).
%Y A217463 Cf. A092573 (number of solutions to n = a^2+3*b^2 with a > 0, b > 0).
%Y A217463 Cf. A216511 (number of solutions to n = a^2+7*b^2 with a > 0, b > 0).
%K A217463 nonn
%O A217463 1,8
%A A217463 _V. Raman_, Oct 04 2012