login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274555 Nonsquare n such that n*(n+1)/2 is the sum of two nonzero squares. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
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.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
17 is a term because 17 is not a square and 17*(17+1)/2 = 153 = 3^2 + 12^2.
PROG
(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
CROSSREFS
Sequence in context: A156777 A070142 A070143 * A140679 A346527 A152817
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jul 06 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 02:46 EDT 2024. Contains 371917 sequences. (Running on oeis4.)