login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050075 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) = 1, a(2) = 2, and a(3) = 3. 0
1, 2, 3, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 0, 2, 1, 1, 2, 0, 0, 1, 0, 2, 2, 1, 0, 2, 2, 2, 1, 1, 0, 2, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 2, 2, 2, 1, 1, 1, 1, 0, 0, 2, 0, 2, 1, 0, 2, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 2, 2, 2, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..90.

PROG

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

CROSSREFS

Sequence in context: A079757 A071493 A289813 * A247490 A002120 A021435

Adjacent sequences:  A050072 A050073 A050074 * A050076 A050077 A050078

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Name edited by Petros Hadjicostas, May 16 2020

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 22 17:18 EDT 2021. Contains 345388 sequences. (Running on oeis4.)