A007692 Numbers that are the sum of 2 nonzero squares in 2 or more ways.
50, 65, 85, 125, 130, 145, 170, 185, 200, 205, 221, 250, 260, 265, 290, 305, 325, 338, 340, 365, 370, 377, 410, 425, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 650, 680, 685, 689, 697, 725, 730, 740, 745, 754, 765
Offset: 1
Examples
50 is a term since 1^2 + 7^2 and 5^2 + 5^2 equal 50. 25 is not a term since though 3^2 + 4^2 = 25, 25 is square, i.e., 0^2 + 5^2 = 25, leaving it with only one possible sum of 2 nonzero squares. 625 is a term since it is the sum of squares of {0,25}, {7,24}, and {15,20}.
References
- Ming-Sun Li, Kathryn Robertson, Thomas J. Osler, Abdul Hassen, Christopher S. Simons and Marcus Wright, "On numbers equal to the sum of two squares in more than one way", Mathematics and Computer Education, 43 (2009), 102 - 108.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 125.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- AskNRICH Archive, Numbers expressible as the sum of 2 squares in more than one way
- D. J. C. Mackay and S. Mahajan, Numbers that are Sums of Squares in Several Ways
- G. Xiao, Two squares
- Index entries for sequences related to sums of squares
Crossrefs
Programs
-
Haskell
import Data.List (findIndices) a007692 n = a007692_list !! (n-1) a007692_list = findIndices (> 1) a025426_list -- Reinhard Zumkeller, Aug 16 2011
-
Mathematica
Select[Range@ 800, Length@ Select[PowersRepresentations[#, 2, 2], First@ # != 0 &] > 1 &] (* Michael De Vlieger, May 16 2016 *)
-
PARI
isA007692(n)=nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb >= 2; \\ Altug Alkan, May 16 2016
-
PARI
is(n)=my(t); if(n<9, return(0)); for(k=sqrtint(n\2-1)+1,sqrtint(n-1), if(issquare(n-k^2)&&t++>1, return(1))); 0 \\ Charles R Greathouse IV, Jun 08 2016
Comments