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!)
A268831 Permutation of nonnegative integers: a(0) = 0, a(n) = A268717(1+A268827(n-1)). 6
0, 1, 3, 2, 6, 7, 5, 4, 13, 12, 11, 10, 15, 14, 31, 30, 27, 26, 9, 8, 25, 24, 55, 54, 51, 50, 17, 16, 49, 48, 29, 28, 21, 20, 19, 18, 23, 22, 103, 102, 99, 98, 33, 32, 97, 96, 45, 44, 37, 36, 35, 34, 39, 38, 53, 52, 61, 60, 59, 58, 63, 62, 47, 46, 43, 42, 57, 56, 41, 40, 199, 198, 195, 194, 65, 64, 193, 192, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The sixth "shifted power" of A268717.
LINKS
FORMULA
a(0) = 0, for n >= 1, a(n) = A268717(1+A268827(n-1)).
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]]]; A268823[n_]:= If[n<2, n, A268717[1 + A268717[1 + A268717[n - 2]]]]; A268825[n_]:=If[n<1, 0, A268717[1 + A268823[n - 1]]]; A268827[n_]:=If[n<1, 0, A268717[1 + A268825[n - 1]]]; A268831[n_]:=If[n<1, 0, A268717[1 + A268827[n - 1]]]; Table[A268831[n], {n, 0, 100}] (* Indranil Ghosh, Apr 03 2017 *)
PROG
(Scheme) (define (A268831 n) (if (zero? n) n (A268717 (+ 1 (A268827 (- n 1))))))
(PARI) A003188(n) = bitxor(n, n\2);
A006068(n) = if(n<2, n, {my(m = A006068(n\2)); 2*m + (n%2 + m%2)%2});
A268717(n) = if(n<1, 0, A003188(1 + A006068(n - 1)));
A268823(n) = if(n<2, n, A268717(1 + A268717(1 + A268717(n - 2))));
A268825(n) = if(n<1, 0, A268717(1+A268823(n - 1)));
A268827(n) = if(n<1, 0, A268717(1+A268825(n - 1)));
for(n=0, 100, print1(if(n<1, 0, A268717(1+A268827(n - 1))), ", ")) \\ Indranil Ghosh, Apr 03 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
def A268717(n): return 0 if n<1 else A003188(1 + A006068(n - 1))
def A268823(n): return A268717(1 + A268717(1 + A268717(n - 2))) if n>1 else n
def A268825(n): return A268717(1 + A268823(n - 1)) if n>0 else 0
def A268827(n): return A268717(1 + A268825(n - 1)) if n>0 else 0
def a(n): return A268717(1 + A268827(n - 1)) if n>0 else 0
print([a(n) for n in range(101)]) # Indranil Ghosh, Apr 03 2017
CROSSREFS
Inverse: A268832.
Row 6 of A268820.
Sequence in context: A269401 A268933 A360982 * A154435 A006042 A100280
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 14 2016
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 April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)