A022804 a(n) = B(n) + c(n) where B(n) is Beatty sequence [ n*sqrt(2) ] and c is the complement of B.
4, 8, 14, 18, 24, 28, 32, 38, 42, 48, 52, 56, 62, 66, 72, 76, 82, 86, 90, 96, 100, 106, 110, 114, 120, 124, 130, 134, 140, 144, 148, 154, 158, 164, 168, 172, 178, 182, 188, 192, 196, 202, 206, 212, 216, 222, 226, 230, 236, 240, 246, 250, 254, 260
Offset: 1
Keywords
Links
Programs
-
Magma
[2*(n + Floor(n*Sqrt(2))): n in [1..100]]; // G. C. Greubel, Sep 08 2018
-
Mathematica
Table[2 n + 2 Floor[n*Sqrt[2]], {n, 1, 200}]
-
PARI
vector(100, n, 2*(n+floor(n*sqrt(2)))) \\ G. C. Greubel, Sep 08 2018
Formula
a(n) = 2*A003151(n) = 2*(n + floor(n*sqrt(2))).