login
a(n) = floor(n*(sqrt(6) + sqrt(2) + 2)/4).
5

%I #14 Sep 08 2022 08:45:19

%S 1,2,4,5,7,8,10,11,13,14,16,17,19,20,21,23,24,26,27,29,30,32,33,35,36,

%T 38,39,41,42,43,45,46,48,49,51,52,54,55,57,58,60,61,63,64,65,67,68,70,

%U 71,73,74,76,77,79,80,82,83,85,86,87,89,90,92,93,95,96,98,99,101,102

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

%C Beatty sequence for (sqrt(6)+sqrt(2)+2)/4 = 1.465925826289...; complement of A110117.

%H G. C. Greubel, <a href="/A110118/b110118.txt">Table of n, a(n) for n = 1..10000</a>

%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 With[{c = (Sqrt[2] + Sqrt[6] + 2)/4}, Floor[c*Range[100]]] (* _G. C. Greubel_, Mar 27 2018 *)

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

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

%Y Cf. A110119.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jul 13 2005