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.

A379925 Numbers k for which nonnegative integers x and y exist such that x^2 + y^2 = k and x + y is a square.

This page as a plain text file.
%I A379925 #13 Feb 10 2025 15:15:18
%S A379925 0,1,8,10,16,41,45,53,65,81,128,130,136,146,160,178,200,226,256,313,
%T A379925 317,325,337,353,373,397,425,457,493,533,577,625,648,650,656,666,680,
%U A379925 698,720,746,776,810,848,890,936,986,1040,1098,1160,1201,1205,1213,1225,1226
%N A379925 Numbers k for which nonnegative integers x and y exist such that x^2 + y^2 = k and x + y is a square.
%C A379925 Numbers k for which exists at least one solution to k = x^2 + (z^2 - x)^2 in integers x and z with x >= 0 and z >= sqrt(2*x).
%C A379925 Subsequence of A001481.
%H A379925 Felix Huber, <a href="/A379925/b379925.txt">Table of n, a(n) for n = 1..10000</a>
%H A379925 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sum_of_two_squares_theorem">Sum of two squares theorem</a>
%F A379925 k = m^(4*j) is in the sequence for nonnegative integers m and j (not both 0) because x = 0 and z = m^j is a solution to m^(4*j) = x^2 + (z^2 - x)^2.
%e A379925 10 is in the sequence because 10 = 1^2 + 3^2 and 1 + 3 = 2^2.
%e A379925 81 is in the sequence because 81 = 0^2 + 9^2 and 0 + 9 = 3^2.
%p A379925 # Calculates the first 10005 terms.
%p A379925 A379925:=proc(K)
%p A379925     local i,j,L;
%p A379925     L:={};
%p A379925     for i from 0 to floor(sqrt((K+1)^2)/2) do
%p A379925         for j from 0 to floor(sqrt((K+1)^2/2-i^2)) do
%p A379925             if issqr(i+j) then
%p A379925                 L:=L union {i^2+j^2}
%p A379925             fi
%p A379925         od
%p A379925     od;
%p A379925     return op(L)
%p A379925 end proc;
%p A379925 A379925(1737);
%o A379925 (PARI) isok(n)=my(x=0, r=0); while(x<=sqrt(n) && r==0, if(issquare(n-x^2) && issquare(x+sqrtint(n-x^2)), r=1); x++); r; \\ _Michel Marcus_, Feb 10 2025
%Y A379925 Cf. A000161, A000290, A001481, A004018, A025284-A025320, A091072, A125110, A118882, A125022, A380072, A380073, A380074.
%K A379925 easy,nonn
%O A379925 1,3
%A A379925 _Felix Huber_, Jan 25 2025