OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16383
Indranil Ghosh, C program to generate the sequence
FORMULA
MATHEMATICA
PROG
(Scheme) (define (A268726 n) (A000523 (A003987bi n (A268717 (+ 1 n))))) ;; A003987bi implements the bitwise-XOR, defined in A003987.
(PARI) A003188(n) = bitxor(n, n\2);
for(n=0, 200, print1(logint(bitxor(n, A268717(n + 1)), 2), ", ")) \\ Indranil Ghosh, Apr 02 2017
(Python)
def A003188(n): return n^(n//2)
def A006068(n):
if n<2: return n
else:
m=A006068(n//2)
return 2*m + (n%2 + m%2)%2
print([int(math.floor(math.log(n^A268717(n + 1), 2))) for n in range(201)]) # Indranil Ghosh, Apr 02 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 13 2016
STATUS
approved