login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050073 a(n) = |a(n-1) - a(m)| for n >= 4, where m = n - 1 - 2^p 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

%I #9 May 15 2020 13:04:10

%S 1,1,1,0,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,1,0,1,1,1,0,1,

%T 0,1,1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,0,1,

%U 1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1

%N a(n) = |a(n-1) - a(m)| for n >= 4, where m = n - 1 - 2^p and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.

%o (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; for(n=4, nn, va[n] = abs(va[n-1] - va[n - 1 - 2^logint(n-2, 2)])); va; } \\ _Petros Hadjicostas_, May 15 2020

%K nonn

%O 1,1

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 10 00:26 EDT 2024. Contains 375769 sequences. (Running on oeis4.)