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.

Showing 1-1 of 1 results.

A274555 Nonsquare n such that n*(n+1)/2 is the sum of two nonzero squares.

Original entry on oeis.org

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

Views

Author

Altug Alkan, Jul 06 2016

Keywords

Comments

Sequence focuses on the nonsquare numbers in order to eliminate trivial solutions (A000217(n^2) = (n^2 + n^4)/2 = ((n + n^2)/2)^2 + ((n - n^2)/2)^2).
A073412 is a subsequence. Additionally, (A073412(n), A073412(n) + 1) gives consecutive pairs of this sequence that are (72, 73), (232, 233), (520, 521), (584, 585), ...
Proof:
Note that (a^2 + b^2)*(c^2 + d^2)/2 = ((a*c + b*d)^2 + (a*d - b*c)^2)/2 = ((a*c + b*d + a*d - b*c)/2)^2 + ((a*c + b*d - a*d + b*c)/2)^2 and A073412(n) + k is not a square by definition of it for 0 <= k <= 2. So this explains the reason of the fact that A073412(n) and A073412(n) + 1 are always members of this sequence. Furthermore, if there is a consecutive pair in this sequence, the lesser of pair must be in A073412 since n, n+1 and n+2 must be the sum of two nonzero squares, if n*(n+1)/2 and (n+1)*(n+2)/2 are the sum of two nonzero squares and n, n+1, n+2 are nonsquares. So exactly (A073412(n), A073412(n) + 1) gives consecutive pairs of this sequence.

Examples

			17 is a term because 17 is not a square and 17*(17+1)/2 = 153 = 3^2 + 12^2.
		

Crossrefs

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
Showing 1-1 of 1 results.