OFFSET
0,3
COMMENTS
The "third shifted power" of permutation A268717.
LINKS
FORMULA
PROG
(PARI) A003188(n) = bitxor(n, floor(n/2));
for(n=0, 100, print1(if(n<2, n, A268717(1 + A268717(1 + A268717(n - 2)))), ", ")) \\ Indranil Ghosh, Mar 31 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([a(n) for n in range(101)]) # Indranil Ghosh, Mar 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 14 2016
STATUS
approved