login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A050072
a(n) = |a(n-1) - a(m)| for n >= 4, where m = 2^(p+1) + 2 - n and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.
0
1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0
OFFSET
1,1
MAPLE
a := proc(n) option remember; `if`(n < 4, 1,
abs(a(n - 1) - a(Bits:-Iff(n - 2$2) + 3 - n)))
end:
seq(a(n), n = 1..90); # Petros Hadjicostas, Nov 08 2019
CROSSREFS
Sequence in context: A275737 A080909 A087755 * A267576 A156707 A131309
KEYWORD
nonn
EXTENSIONS
Name edited by Petros Hadjicostas, Nov 08 2019
STATUS
approved