OFFSET
1,2
COMMENTS
Positions of the integers when the numbers a + b*sqrt(2) are arranged in increasing order. - Clark Kimberling, Mar 16 2015
It seems the name of this sequence could also be "Indices where records occur in A007336". - Ivan N. Ianakiev, Sep 09 2019
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 1 + Sum_{k=1..n-1} ceiling(r*k) where r=1/sqrt(2). - Benoit Cloitre, Jan 24 2009
EXAMPLE
The ordering of numbers a+b*r, where r = sqrt(2) as in Comments, begins with 0, 1, r, 2, 1+r, 2r, 3, 2+r, 1+2r, 4, ... in which the positions of integers are 1, 2, 4, 7, 10.
MATHEMATICA
t = Table[n + 1 + Sum[Floor[(n - k)/Sqrt[2]], {k, 0, n}], {n, 0, 200}] (* A022776 *)
Differences[t] (* A049474 *) (* Clark Kimberling, Mar 14 2015 *)
PROG
(PARI) a(n)=1+sum(k=1, n-1, ceil(k/sqrt(2))) \\ Benoit Cloitre, Jan 24 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved