cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A268818 Permutation of nonnegative integers: a(n) = A268718(A268718(n)).

This page as a plain text file.
%I A268818 #9 Jun 07 2017 12:59:31
%S A268818 0,1,6,4,3,10,2,7,15,5,14,11,8,13,18,16,23,29,22,19,32,21,9,24,12,25,
%T A268818 30,28,27,34,26,31,39,45,38,35,48,37,57,40,60,41,46,44,43,17,42,47,20,
%U A268818 49,54,52,51,58,50,55,63,53,62,59,56,61,66,64,71,77,70,67,80,69,89,72,92,73,78,76,75,113,74,79,116,81
%N A268818 Permutation of nonnegative integers: a(n) = A268718(A268718(n)).
%H A268818 Antti Karttunen, <a href="/A268818/b268818.txt">Table of n, a(n) for n = 0..8191</a>
%H A268818 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A268818 a(n) = A268718(A268718(n)).
%o A268818 (Scheme) (define (A268818 n) (A268718 (A268718 n)))
%o A268818 (Python)
%o A268818 def a003188(n): return n^(n>>1)
%o A268818 def a006068(n):
%o A268818     s=1
%o A268818     while True:
%o A268818         ns=n>>s
%o A268818         if ns==0: break
%o A268818         n=n^ns
%o A268818         s<<=1
%o A268818     return n
%o A268818 def a278618(n): return 0 if n==0 else 1 + a003188(a006068(n) - 1)
%o A268818 def a(n): return a278618(a278618(n)) # _Indranil Ghosh_, Jun 07 2017
%Y A268818 Inverse: A268817.
%Y A268818 Cf. A268718.
%Y A268818 Cf. also A268822.
%K A268818 nonn
%O A268818 0,3
%A A268818 _Antti Karttunen_, Feb 14 2016