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.

A295819 Number of nonnegative solutions to (x,y) = 1 and x^2 + y^2 = n.

This page as a plain text file.
%I A295819 #63 Oct 28 2018 04:50:50
%S A295819 0,2,1,0,0,2,0,0,0,0,2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,2,2,0,0,2,0,0,0,0,
%T A295819 2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,2,0,0,2,0,0,0,4,0,0,
%U A295819 0,0,0,0,0,2,2,0,0,0,0,0,0,0,2,0,0,4,0,0
%N A295819 Number of nonnegative solutions to (x,y) = 1 and x^2 + y^2 = n.
%H A295819 Seiichi Manyama, <a href="/A295819/b295819.txt">Table of n, a(n) for n = 0..1000</a>
%F A295819 a(n) = A000089(n) for n >= 2.
%F A295819 a(A006278(n)) = 2^n for n >= 1.
%e A295819 a(1) = 2;
%e A295819 (1,0) = 1 and 1^2 + 0^2 =  1.
%e A295819 (0,1) = 1 and 0^2 + 1^2 =  1.
%e A295819 a(2) = 1;
%e A295819 (1,1) = 1 and 1^2 + 1^2 =  2. ->  1^2 +  1^2 == 1^2 + 1 == 0 mod  2.
%e A295819 a(5) = 2;
%e A295819 (2,1) = 1 and 2^2 + 1^2 =  5. ->  2^2 +  1^2 == 2^2 + 1 == 0 mod  5.
%e A295819 (1,2) = 1 and 1^2 + 2^2 =  5. ->  3^2 +  6^2 == 3^2 + 1 == 0 mod  5.
%e A295819 a(10) = 2;
%e A295819 (3,1) = 1 and 3^2 + 1^2 = 10. ->  3^2 +  1^2 == 3^2 + 1 == 0 mod 10.
%e A295819 (1,3) = 1 and 1^2 + 3^2 = 10. ->  7^2 + 21^2 == 7^2 + 1 == 0 mod 10.
%e A295819 a(13) = 2;
%e A295819 (3,2) = 1 and 3^2 + 2^2 = 13. -> 21^2 + 14^2 == 8^2 + 1 == 0 mod 13.
%e A295819 (2,3) = 1 and 2^2 + 3^2 = 13. -> 18^2 + 27^2 == 5^2 + 1 == 0 mod 13.
%t A295819 a[n_] := Sum[j = Sqrt[n - i^2] // Floor; Boole[GCD[i, j] == 1 && i^2 + j^2 == n], {i, 0, Sqrt[n]}];
%t A295819 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jul 05 2018, after _Andrew Howroyd_ *)
%o A295819 (PARI) a(n) = {sum(i=0, sqrtint(n), my(j=sqrtint(n-i^2)); gcd(i,j)==1 && i^2+j^2==n)} \\ _Andrew Howroyd_, Dec 12 2017
%Y A295819 Cf. A006278.
%Y A295819 Similar sequences: A000010, A000925, A295820, A295848, A295976.
%Y A295819 A000089 is essentially the same sequence.
%K A295819 nonn
%O A295819 0,2
%A A295819 _Seiichi Manyama_, Nov 28 2017