OFFSET
1,2
COMMENTS
0 <= A144077(n) - a(n) <= 1. - Reinhard Zumkeller, Sep 09 2008
From Reinhard Zumkeller, Jan 20 2010: (Start)
A080757(n) = a(n+1) - a(n).
A171970(n) = floor(a(n)/2).
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.
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
MAPLE
MATHEMATICA
Table[Floor[n 3^(1/2)] , {n, 1, 65}] (* Geoffrey Critzer, Jan 11 2015 *)
PROG
(Haskell)
a022838 = floor . (* sqrt 3) . fromIntegral
-- Reinhard Zumkeller, Sep 14 2014
(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
(Magma) [Floor(n*Sqrt(3)): n in [1..60]]; // G. C. Greubel, Sep 28 2018
(Python)
from math import isqrt
def A022838(n): return isqrt(3*n*n) # Chai Wah Wu, Aug 06 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved