A024508 Numbers that are a sum of 2 distinct nonzero squares in more than one way.
65, 85, 125, 130, 145, 170, 185, 205, 221, 250, 260, 265, 290, 305, 325, 340, 365, 370, 377, 410, 425, 442, 445, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 580, 585, 610, 625, 629, 650, 680, 685, 689, 697, 725, 730, 740, 745, 754, 765, 785, 793, 820, 845, 850, 865, 884, 890, 901, 905, 925, 949, 962, 965, 970, 985, 986, 1000, 1010, 1025, 1037, 1040, 1060, 1066, 1073, 1090, 1105, 1125
Offset: 1
Keywords
Links
- David A. Corneth, Table of n, a(n) for n = 1..10749
- G. Xiao, Two squares
- Index entries for sequences related to sums of squares
Crossrefs
Programs
-
Mathematica
lst={};q=-1;k=1;Do[Do[x=a^2;Do[y=b^2;If[x+y==n,If[n==q&&k==1,AppendTo[lst,n]];If[n!=q,q=n;k=1,k++ ]],{b,Floor[(n-x)^(1/2)],a+1,-1}],{a,Floor[n^(1/2)],1,-1}],{n,2*6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 22 2009 *)
-
PARI
is(n) = {my(t=0,i);t=sum(i=1,sqrtint((n-1)\2),issquare(n-i^2));t>1} \\ David A. Corneth, Jun 10 2016
-
PARI
is(n)=if(n<9,return(0)); my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)/2-issquare(n/2)>1 \\ Charles R Greathouse IV, Jun 10 2016
Comments