login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007759 Knopfmacher expansion of sqrt(2): a(2n) = 2*(a(2n-1) + 1)^2 - 1, a(2n+1) = 2*(a(2n)^2 - 1). 2
2, 17, 576, 665857, 886731088896, 1572584048032918633353217, 4946041176255201878775086487573351061418968498176, 48926646634423881954586808839856694558492182258668537145547700898547222910968507268117381704646657 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..11

A. Knopfmacher and J. Knopfmacher, An alternating product representation for real numbers, in Applications of Fibonacci numbers, Vol. 3 (Kluwer 1990), pp. 209-216.

MAPLE

a:= proc(n) option remember;

if n=1 then 2

elif `mod`(n, 2) = 0 then 2*(a(n-1) +1)^2 -1

else 2*(a(n-1)^2 -1)

end if; end proc;

seq(a(n), n = 1..9); # G. C. Greubel, Mar 04 2020

MATHEMATICA

a[n_]:= a[n]= If[n==1, 2, If[EvenQ[n], 2*(a[n-1] +1)^2 -1, 2*a[n-1]^2 -2]]; Table[a[n], {n, 9}] (* G. C. Greubel, Mar 04 2020 *)

PROG

(PARI) a(n) = if (n==1, 2, if (n % 2, 2*a(n-1)^2 - 2, 2*(a(n-1)+1)^2 - 1)); \\ Michel Marcus, Feb 20 2019

(MAGMA)

function a(n)

  if n eq 1 then return 2;

  elif n mod 2 eq 0 then return 2*(a(n-1) +1)^2 -1;

  else return 2*(a(n-1)^2 -1);

  end if; return a; end function;

[a(n): n in [1..9]]; // G. C. Greubel, Mar 04 2020

(Sage)

@CachedFunction

def a(n):

    if (n==1): return 2

    elif (n%2==0): return 2*(a(n-1) +1)^2 -1

    else: return 2*(a(n-1)^2 -1)

[a(n) for n in (1..9)] # G. C. Greubel, Mar 04 2020

CROSSREFS

Cf. A002193 (sqrt(2)), A001601.

Sequence in context: A220476 A293178 A172341 * A062710 A012939 A013094

Adjacent sequences:  A007756 A007757 A007758 * A007760 A007761 A007762

KEYWORD

nonn

AUTHOR

Arnold Knopfmacher

EXTENSIONS

More terms from Christian G. Bower, Jan 06 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 08:18 EDT 2021. Contains 347469 sequences. (Running on oeis4.)