A022838 Beatty sequence for sqrt(3); complement of A054406.
1, 3, 5, 6, 8, 10, 12, 13, 15, 17, 19, 20, 22, 24, 25, 27, 29, 31, 32, 34, 36, 38, 39, 41, 43, 45, 46, 48, 50, 51, 53, 55, 57, 58, 60, 62, 64, 65, 67, 69, 71, 72, 74, 76, 77, 79, 81, 83, 84, 86, 88, 90, 91, 93, 95, 96, 98, 100, 102, 103, 105, 107, 109, 110, 112
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Clark Kimberling, Beatty sequences and trigonometric functions, Integers 16 (2016), #A15.
- Eric Weisstein's World of Mathematics, Beatty Sequence.
- Index entries for sequences related to Beatty sequences
Crossrefs
Programs
-
Haskell
a022838 = floor . (* sqrt 3) . fromIntegral -- Reinhard Zumkeller, Sep 14 2014
-
Magma
[Floor(n*Sqrt(3)): n in [1..60]]; // G. C. Greubel, Sep 28 2018
-
Maple
A022838 := proc(n) floor(n*sqrt(3)) ; end proc: # R. J. Mathar, Mar 25 2013
-
Mathematica
Table[Floor[n 3^(1/2)] , {n, 1, 65}] (* Geoffrey Critzer, Jan 11 2015 *)
-
PARI
vector(60, n, floor(n*sqrt(3))) \\ G. C. Greubel, Sep 28 2018
-
PARI
a(n)=sqrtint(3*n^2) \\ Charles R Greathouse IV, Nov 01 2021
-
Python
from math import isqrt def A022838(n): return isqrt(3*n*n) # Chai Wah Wu, Aug 06 2022
Formula
a(n) = floor(n*sqrt(3)). - Reinhard Zumkeller, Jan 20 2010
a(n) = 2 * floor(n * (sqrt(3) - 1)) + floor(n * (2 - sqrt(3))) + 1. - Miko Labalan, Dec 03 2016
Comments