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.

A246200 Self-inverse permutation of natural numbers: a(n) = A057889(3*n) / 3.

This page as a plain text file.
%I A246200 #29 Mar 26 2021 09:25:35
%S A246200 0,1,2,3,4,5,6,7,8,9,10,11,12,19,14,15,16,17,18,13,20,21,22,27,24,35,
%T A246200 38,23,28,39,30,31,32,33,34,25,36,41,26,29,40,37,42,43,44,75,54,59,48,
%U A246200 67,70,51,76,83,46,55,56,71,78,47,60,79,62,63,64,65,66,49,68,81,50,57,72,73,82,45,52,77,58,61,80,69
%N A246200 Self-inverse permutation of natural numbers: a(n) = A057889(3*n) / 3.
%C A246200 In binary system, 3 ("11" in binary), has a similar shortcut rule for divisibility as eleven has in decimal system. This rule doesn't depend on which end of the number representation it is applied from, thus, if we reverse the number 3*n with "balanced bit-reverse" (A057889), the result should still be divisible by 3. Moreover, because the reversing operation is itself a self-inverse involution, and the prime factorization of any natural number is unique, we get a self-inverse permutation of nonnegative integers when we divide the bit-reversed result with 3.
%H A246200 Antti Karttunen, <a href="/A246200/b246200.txt">Table of n, a(n) for n = 0..10921</a>
%H A246200 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A246200 a(n) = A057889(3*n) / 3.
%o A246200 (Scheme)  (define (A246200 n) (/ (A057889 (* 3 n)) 3))
%o A246200 (Python)
%o A246200 def a057889(n):
%o A246200     x=bin(n)[2:]
%o A246200     y=x[::-1]
%o A246200     return int(str(int(y))+(len(x) - len(str(int(y))))*'0', 2)
%o A246200 def a(n): return a057889(3*n)//3
%o A246200 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 11 2017
%Y A246200 Cf. A036215, A057889, A003714, A048724, A083822, A083824.
%K A246200 nonn,base,look
%O A246200 0,3
%A A246200 _Antti Karttunen_, Aug 27 2014