|
|
A268821
|
|
Permutation of nonnegative integers: a(0) = 0, a(n) = A268717(1 + A268717(n-1)).
|
|
6
|
|
|
0, 1, 3, 2, 7, 6, 13, 12, 5, 4, 25, 24, 9, 8, 15, 14, 11, 10, 49, 48, 17, 16, 23, 22, 19, 18, 27, 26, 31, 30, 21, 20, 29, 28, 97, 96, 33, 32, 39, 38, 35, 34, 43, 42, 47, 46, 37, 36, 45, 44, 51, 50, 55, 54, 61, 60, 53, 52, 41, 40, 57, 56, 63, 62, 59, 58, 193, 192, 65, 64, 71, 70, 67, 66, 75, 74, 79, 78, 69, 68, 77, 76, 83, 82
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The "shifted square" of permutation A268717.
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 0:
|
|
MATHEMATICA
|
A003188[n_]:=BitXor[n, Floor[n/2]]; A006068[n_]:=If[n<2, n, Block[{m = A006068[Floor[n/2]]}, 2m + Mod[Mod[n, 2] + Mod[m, 2], 2]]]; A268717[n_]:=If[n<1, 0, A003188[1 + A006068[n - 1]]]; Table[If[n<2, n, A268717[1 + A268717[n - 1]]], {n, 0, 100}] (* Indranil Ghosh, Apr 01 2017 *)
|
|
PROG
|
(PARI) A003188(n) = bitxor(n, n\2);
(Python)
if n<2: return n
else:
return 2*m + (n%2 + m%2)%2
|
|
CROSSREFS
|
From term a(2) onward (3, 2, 7, 6, ...) also row 3 of A268715.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|