A137803 a(n) = floor(n*(sqrt(2) + 1/2)).
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 112, 114, 116, 118, 120, 122, 124, 126
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000 (terms 1..1000 from R. Zumkeller)
- Eric Weisstein's World of Mathematics, Beatty Sequence
- Index entries for sequences related to Beatty sequences
Programs
-
Magma
[Floor(n*(Sqrt(2)+1/2)): n in [1..50]]; // G. C. Greubel, Jan 27 2018
-
Mathematica
Floor[Range[80](Sqrt[2]+1/2)] (* Harvey P. Dale, Mar 24 2011 *)
-
PARI
for(n=1,50, print1(floor(n*(sqrt(2)+1/2)), ", ")) \\ G. C. Greubel, Jan 27 2018
-
Python
from math import isqrt 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
Comments