login
A022804
a(n) = B(n) + c(n) where B(n) is Beatty sequence [ n*sqrt(2) ] and c is the complement of B.
2
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,1
FORMULA
a(n) = 2*A003151(n) = 2*(n + floor(n*sqrt(2))).
MATHEMATICA
Table[2 n + 2 Floor[n*Sqrt[2]], {n, 1, 200}]
PROG
(PARI) vector(100, n, 2*(n+floor(n*sqrt(2)))) \\ G. C. Greubel, Sep 08 2018
(Magma) [2*(n + Floor(n*Sqrt(2))): n in [1..100]]; // G. C. Greubel, Sep 08 2018
CROSSREFS
Sequence in context: A312548 A312549 A312550 * A312551 A312552 A189396
KEYWORD
nonn
STATUS
approved