A182691 Composite Beatty sequence of sqrt(2).
3, 4, 13, 18, 61, 86, 293, 414, 1413, 1998, 6821, 9646, 32933, 46574, 159013, 224878, 767781, 1085806, 3707173, 5242734, 17899813, 25314158, 86427941, 122227566, 417311013, 590166894, 2014955813, 2849577838, 9729067301
Offset: 1
Keywords
Examples
a(1)=floor(2+sqrt(2))=3, a(2)=floor(r*a(1))=4.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Programs
-
Maple
Digits := 16 ; A182691 := proc(n) option remember; local r,s ; r := sqrt(2) ; s := 2+r ; if n = 1 then floor(s) ; elif type(n,'odd') then floor(s*procname(n-1)) ; else floor(r*procname(n-1)) ; end if; end proc: seq(A182691(n),n=1..30) ;
-
Mathematica
a[1]:= 3; a[n_]:= If[OddQ[n], Floor[(2+Sqrt[2])*a[n-1]], Floor[Sqrt[2]*a[n-1]]]; Table[a[n], {n, 1, 50}] (* G. C. Greubel, Sep 29 2018 *)
Formula
a(n) = floor(s*a(n-1)) if n odd, a(n)=floor(r*a(n-1)) if n even, where r=sqrt(2), s=2+r, a(1)=floor(s).
Comments