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.

A233280 Permutation of nonnegative integers: a(n) = A003188(A054429(n)).

This page as a plain text file.
%I A233280 #25 Jun 11 2017 15:15:28
%S A233280 0,1,2,3,4,5,7,6,8,9,11,10,14,15,13,12,16,17,19,18,22,23,21,20,28,29,
%T A233280 31,30,26,27,25,24,32,33,35,34,38,39,37,36,44,45,47,46,42,43,41,40,56,
%U A233280 57,59,58,62,63,61,60,52,53,55,54,50,51,49,48,64,65,67,66
%N A233280 Permutation of nonnegative integers: a(n) = A003188(A054429(n)).
%C A233280 This permutation transforms the enumeration system of positive irreducible fractions A071766/A229742 (HCS) into the enumeration system A007305/A047679 (Stern-Brocot), and the enumeration system A245325/A245326 into A162909/A162910 (Bird). - _Yosu Yurramendi_, Jun 09 2015
%H A233280 Antti Karttunen, <a href="/A233280/b233280.txt">Table of n, a(n) for n = 0..8191</a>
%H A233280 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A233280 a(n) = A003188(A054429(n)).
%F A233280 a(n) = A063946(A003188(n)).
%F A233280 a(n) = A054429(A154436(n)).
%F A233280 a(0)=0, a(1)=1, and otherwise, a(2n) = A000069(1+a(n)), a(2n+1) = A001969(1+a(n)). [A recurrence based on entangling even & odd numbers with odious and evil numbers]
%F A233280 a(n) = A258746(A180201(n)) = A180201(A117120(n)), n > 0. - _Yosu Yurramendi_, Apr 10 2017
%o A233280 (Scheme)
%o A233280 (define (A233280 n) (A003188 (A054429 n)))
%o A233280 ;; Alternative version, based on entangling even & odd numbers with odious and evil numbers:
%o A233280 (definec (A233280 n) (cond ((< n 2) n) ((even? n) (A000069 (+ 1 (A233280 (/ n 2))))) (else (A001969 (+ 1 (A233280 (/ (- n 1) 2)))))))
%o A233280 (R)
%o A233280 maxrow <- 8 # by choice
%o A233280 a <- 1
%o A233280 for(m in 0:maxrow) for(k in 0:(2^m-1)){
%o A233280 a[2^(m+1)+    k] <- a[2^m+      k] + 2^m
%o A233280 a[2^(m+1)+2^m+k] <- a[2^(m+1)-1-k] + 2^(m+1)
%o A233280 }
%o A233280 a
%o A233280 # _Yosu Yurramendi_, Apr 05 2017
%o A233280 (Python)
%o A233280 from sympy import floor
%o A233280 def a003188(n): return n^(n>>1)
%o A233280 def a054429(n): return 1 if n==1 else 2*a054429(floor(n/2)) + 1 - n%2
%o A233280 def a(n): return 0 if n==0 else a003188(a054429(n)) # _Indranil Ghosh_, Jun 11 2017
%Y A233280 Inverse permutation: A233279.
%Y A233280 Cf. A000069, A001969, A003188, A054429, A063946, A154436.
%Y A233280 Similarly constructed permutation pairs: A003188/A006068, A135141/A227413, A232751/A232752, A233275/A233276, A233277/A233278, A193231 (self-inverse).
%K A233280 nonn
%O A233280 0,3
%A A233280 _Antti Karttunen_, Dec 18 2013