The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A322017 a(0) = 0; for n > 0, if A003188(n) > A003188(n-1) then a(n) = n-1, else if A003188(n+1) < A003188(n) then a(n) = n+1, otherwise a(n) = 0. 4
0, 0, 1, 0, 3, 4, 7, 0, 7, 8, 9, 12, 0, 12, 15, 0, 15, 16, 17, 0, 19, 20, 23, 24, 0, 24, 25, 28, 0, 28, 31, 0, 31, 32, 33, 0, 35, 36, 39, 0, 39, 40, 41, 44, 0, 44, 47, 48, 0, 48, 49, 0, 51, 52, 55, 56, 0, 56, 57, 60, 0, 60, 63, 0, 63, 64, 65, 0, 67, 68, 71, 0, 71, 72, 73, 76, 0, 76, 79, 0, 79, 80, 81, 0, 83, 84, 87, 88, 0, 88, 89 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
For all n, A207901(a(n)) divides A207901(n), and similarly for A302033.
LINKS
MATHEMATICA
g[n_] := BitXor[n, Floor[n/2]]; a[n_] := If[n == 0, 0, If[g[n] > g[n-1], n-1, If[g[n+1] < g[n], n+1, 0]]]; Array[a, 100, 0] (* Amiram Eldar, Dec 05 2018 *)
PROG
(PARI)
A003188(n) = bitxor(n, n>>1);
A322017(n) = if(0==n, 0, if(A003188(n)>A003188(n-1), n-1, if(A003188(1+n) < A003188(n), n+1, 0)));
CROSSREFS
Cf. also A207901, A302033.
Sequence in context: A024476 A372366 A173014 * A093087 A130893 A072079
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 24 2018
STATUS
approved

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 May 21 15:23 EDT 2024. Contains 372738 sequences. (Running on oeis4.)