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.

A127689 a(1)=3; for n>1, a(n) is least number such that a(n) > a(n-1) and a(1)^2+...+a(n)^2 is a square.

Original entry on oeis.org

3, 4, 12, 84, 132, 12324, 15960, 26280, 27300, 66660, 115188, 9777193284, 23465263884, 48701491080, 40900397690640, 680008604512020, 127049882801497788, 247290967245178188, 335580091290976716, 1045885075937364972, 1607091702050097396, 3419793695168900508, 5138020847719969956, 10059508412964112740
Offset: 1

Views

Author

Artur Jasinski, Jan 23 2007

Keywords

Comments

Without the a(n) > a(n-1) constraint, the sequence would be A018930.

Examples

			a(2)=4 because 3^2+4^2=5^2, a(3)=12 because 3^2+4^2+12^2=13^2 etc.
		

Crossrefs

Programs

  • Mathematica
    a = {3}; For[k = 1 + a[[Length[a]]], Length[a] < 11, While[ ! IntegerQ[Sqrt[(k)^2 + Sum[(a[[t]])^2, {t, 1, Length[a]}]]], k++ ]; AppendTo[a, k]]; a
  • PARI
    q=3; s=9; for(n=1,30, b=0; fordiv(s,d, if(d*d>=s,break); t=(s\d-d)/2; if(t>q,b=t); ); q=b; print1(q,", "); s+=q^2); \\ Max Alekseyev, Nov 23 2012

Extensions

More terms from Max Alekseyev, Nov 23 2012