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.

A104803 a(n) = floor(sqrt(a(n-1)^2 + a(n-2)^2)), a(1)=1, a(2)=3.

Original entry on oeis.org

1, 3, 3, 4, 5, 6, 7, 9, 11, 14, 17, 22, 27, 34, 43, 54, 69, 87, 111, 141, 179, 227, 289, 367, 467, 593, 754, 959, 1219, 1551, 1972, 2508, 3190, 4057, 5160, 6563, 8348, 10618, 13506, 17180, 21853, 27797, 35358, 44976, 57210, 72772, 92567, 117747, 149776
Offset: 1

Views

Author

Zak Seidov, Mar 26 2005

Keywords

Crossrefs

Programs

  • Magma
    A104803:= func< n| n lt 3 select (2*n-1) else Floor(Sqrt(Self(n-1)^2 +Self(n-2)^2)) >;
    [A104803(n): n in [1..60]]; // G. C. Greubel, Jun 27 2021
    
  • Mathematica
    a[n_]:= a[n]= If[n<3, 2*n-1, Floor[Sqrt[a[n-1]^2 +a[n-2]^2]]]; Table[a[n], {n, 50}] (* Robert G. Wilson v, Mar 28 2005 *)
    nxt[{a_,b_}]:={b,Floor[Sqrt[a^2+b^2]]}; Transpose[NestList[nxt,{1,3}, 50]] [[1]] (* Harvey P. Dale, Oct 29 2012 *)
  • Sage
    @CachedFunction
    def a(n): return (2*n-1) if (n<3) else floor(sqrt(a(n-1)^2 + a(n-2)^2))
    [a(n) for n in (1..60)] # G. C. Greubel, Jun 27 2021

Formula

a(n) = floor(sqrt(a(n-1)^2 + a(n-2)^2)) with a(1)=1, a(2)=3.

Extensions

More terms from Robert G. Wilson v, Mar 28 2005
Showing 1-1 of 1 results.