|
|
|
|
1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Old definition was "Beatty discrepancy of the complementary equation b(n) = a(a(n)) + a(n)".
|
|
LINKS
|
|
|
FORMULA
|
a(n) = d(n) - c(c(n)) - c(n), where c(n) = A001951 and d(n) = A001952.
|
|
EXAMPLE
|
d(1) - c(c(1)) - c(1) = 3 - 1 - 1 = 1;
d(2) - c(c(2)) - c(2) = 6 - 2 - 2 = 2;
d(3) - c(c(3)) - c(3) = 10 - 5 - 4 = 1;
d(4) - c(c(4)) - c(4) = 13 - 7 - 5 = 1.
|
|
MAPLE
|
a:=n->2*n-floor(sqrt(2)*floor(sqrt(2)*n)): seq(a(n), n=1..120); # Muniru A Asiru, Nov 11 2018
|
|
MATHEMATICA
|
Table[2 n - Floor[Sqrt[2] Floor[Sqrt[2] n]], {n, 1, 100}] (* Vincenzo Librandi, Nov 12 2018 *)
|
|
PROG
|
(PARI) a(n)=2*n-floor(sqrt(2)*floor(sqrt(2)*n)) \\ Benoit Cloitre, May 08 2008
(Magma) [2*n - Floor(Sqrt(2)*Floor(Sqrt(2)*n)): n in [1..100]]; // Vincenzo Librandi, Nov 12 2018
(Python)
from math import isqrt
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|