|
|
A080343
|
|
a(n) = round(sqrt(2*n)) - floor(sqrt(2*n)).
|
|
3
|
|
|
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
Runs are 0^1, 0^1, 0^2 1, 0^2 1, 0^3 1^2, 0^3 1^2, 0^4 1^3, 0^4 1^3, ...
a(n) = 1 iff n >= 4 and n is in the interval [t_k + 1, ..., t_k + floor(k/2)] for some k >= 2, where t_k = k*(k+1)/2 is a triangular number.
|
|
PROG
|
(Python)
from gmpy2 import isqrt_rem
i, j = isqrt_rem(2*n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|