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-2 of 2 results.

A064715 Smallest member of triple of consecutive numbers each of which is the sum of two different nonzero squares.

Original entry on oeis.org

232, 520, 584, 800, 808, 1096, 1224, 1312, 1600, 1664, 1744, 1800, 1872, 1960, 2248, 2312, 2384, 2600, 2824, 3328, 3392, 3600, 4112, 4176, 4328, 4624, 5120, 5328, 5408, 5904, 6056, 6120, 6352, 6408, 6568, 6920, 8080, 8144, 8296, 8352, 8584, 9160, 9376
Offset: 1

Views

Author

Robert G. Wilson v, Oct 13 2001

Keywords

Comments

All terms == 0 mod 8. Is this the same as A073412? - Zak Seidov, Jan 26 2013
This sequence is distinct from A073412 since it does not allow numbers equal to twice a square, like 72, 1152, 2592, 3528, etc. - Giovanni Resta, Jan 29 2013

Examples

			232 = 6^2 + 14^2, 233 = 8^2 + 13^2, and 234 = 3^2 + 15^2.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, Penguin Books Ltd., Middlesex, England, 1997, page 133. - "It is not possible to have 4 such consecutive numbers."

Crossrefs

Cf. A004431.

Programs

  • Mathematica
    a = Table[n^2, {n, 1, 100} ]; c = {}; Do[ c = Append[c, a[[i]] + a[[j]]], {i, 1, 100}, {j, 1, i - 1} ]; c = Union[c]; c[[ Select[ Range[ Length[c] - 2], c[[ # ]] + 2 == c[[ # + 2 ]] & ]]]

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-2 of 2 results.