A274555 Nonsquare n such that n*(n+1)/2 is the sum of two nonzero squares.
17, 40, 52, 72, 73, 80, 89, 97, 116, 136, 145, 148, 180, 193, 232, 233, 241, 244, 260, 288, 292, 305, 313, 337, 360, 369, 388, 404, 409, 424, 449, 457, 481, 520, 521, 544, 548, 577, 584, 585, 592, 612, 628, 640, 656, 673, 697, 724, 745, 772, 793, 800
Offset: 1
Examples
17 is a term because 17 is not a square and 17*(17+1)/2 = 153 = 3^2 + 12^2.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
PARI
isA000404(n) = for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2)); lista(nn) = for(n=1, nn, if(!issquare(n) && isA000404(n*(n+1)/2), print1(n, ", ")));
-
PARI
has(n)=my(f=factor(n)); for(i=1,#f~, if(f[i,1]%4>2 && f[i,2]%2, return(0))); if(#select(p->p%4==1, f[,1]), 2, 1) is(n)=my(t); if(n%4>1 || issquare(n), return(0)); t=has(numerator(n/2)); t && if(t>1, has(numerator((n+1)/2)), t=has(numerator((n+1)/2)); t && (valuation(n*(n+1),2)%2==0 || t>1)) \\ Charles R Greathouse IV, Jul 19 2016
Comments