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!)
A137803 a(n) = floor(n*(sqrt(2) + 1/2)). 18

%I #20 Sep 08 2022 08:45:33

%S 1,3,5,7,9,11,13,15,17,19,21,22,24,26,28,30,32,34,36,38,40,42,44,45,

%T 47,49,51,53,55,57,59,61,63,65,66,68,70,72,74,76,78,80,82,84,86,88,89,

%U 91,93,95,97,99,101,103,105,107,109,111,112,114,116,118,120,122,124,126

%N a(n) = floor(n*(sqrt(2) + 1/2)).

%C a(n) = A059533(n) for n <= 34;

%C Beatty sequence for sqrt(2) + 1/2; complement of A137804;

%C a(n) = A137805(A137804(n)) and A137805(a(n)) = A137804(n).

%H G. C. Greubel, <a href="/A137803/b137803.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from R. Zumkeller)

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BeattySequence.html">Beatty Sequence</a>

%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>

%t Floor[Range[80](Sqrt[2]+1/2)] (* _Harvey P. Dale_, Mar 24 2011 *)

%o (PARI) for(n=1,50, print1(floor(n*(sqrt(2)+1/2)), ", ")) \\ _G. C. Greubel_, Jan 27 2018

%o (Magma) [Floor(n*(Sqrt(2)+1/2)): n in [1..50]]; // _G. C. Greubel_, Jan 27 2018

%o (Python)

%o from math import isqrt

%o def A137803(n): return (n>>1)+(m:=isqrt(r:=n*n<<1))+(n&1)*int(r-m*(m+1)>=1) # _Chai Wah Wu_, Aug 03 2022

%Y Cf. A001951, A003151.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Feb 11 2008

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 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)