%I #25 Sep 08 2022 08:44:39
%S 1,1,2,3,3,4,4,5,6,6,7,8,8,9,10,10,11,11,12,13,13,14,15,15,16,16,17,
%T 18,18,19,20,20,21,22,22,23,23,24,25,25,26,27,27,28,29,29,30,30,31,32,
%U 32,33,34,34,35,36,36,37,37,38,39,39,40,41,41,42,42,43,44,44,45,46,46,47
%N a(n) = (n-th term of Beatty sequence for (3+sqrt(3))/2) - (n-th term of Beatty sequence for sqrt(3)).
%C It appears that a(n) is the nearest integer to (3-sqrt(3))/2 * n. - _Franklin T. Adams-Watters_, Nov 02 2006
%H Muniru A Asiru, <a href="/A014245/b014245.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>
%F a(n) = floor((3+sqrt(3))/2 * n) - floor(sqrt(3) * n).
%p a:=n->floor((3+sqrt(3))/2*n)-floor(sqrt(3)*n): seq(a(n),n=1..80); # _Muniru A Asiru_, Oct 17 2018
%t With[{r = Sqrt@ 3}, Array[Floor[# (3 + r)/2] - Floor[# r] &, 80] ] (* _Michael De Vlieger_, Oct 17 2018 *)
%o (PARI) my(r=sqrt(3)); vector(80, n, (n*r*(r+1))\2 - (n*r)\1) \\ _G. C. Greubel_, Jun 19 2019
%o (Magma) r:=Sqrt(3); [Floor(n*r*(r+1)/2) - Floor(n*r): n in [1..80]]; // _G. C. Greubel_, Jun 19 2019
%o (Sage) r=sqrt(3); [floor(n*r*(r+1)/2) - floor(n*r) for n in (1..80)] # _G. C. Greubel_, Jun 19 2019
%Y Cf. A054406, A022838.
%K nonn
%O 1,3
%A _Clark Kimberling_
%E Corrected and extended by _Franklin T. Adams-Watters_, Nov 02 2006
%E Extraneous comma following a(56) removed by _Sean A. Irvine_, Oct 17 2018