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!)
A104803 a(n) = floor(sqrt(a(n-1)^2 + a(n-2)^2)), a(1)=1, a(2)=3. 10
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = floor(sqrt(a(n-1)^2 + a(n-2)^2)) with a(1)=1, a(2)=3.
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 *)
PROG
(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
(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
CROSSREFS
Sequence in context: A063197 A327226 A011977 * A104804 A240207 A347286
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 26 2005
EXTENSIONS
More terms from Robert G. Wilson v, Mar 28 2005
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 05:26 EDT 2024. Contains 371918 sequences. (Running on oeis4.)