A246200 Self-inverse permutation of natural numbers: a(n) = A057889(3*n) / 3.
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, 38, 23, 28, 39, 30, 31, 32, 33, 34, 25, 36, 41, 26, 29, 40, 37, 42, 43, 44, 75, 54, 59, 48, 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
Offset: 0
Links
Programs
-
Python
def a057889(n): x=bin(n)[2:] y=x[::-1] return int(str(int(y))+(len(x) - len(str(int(y))))*'0', 2) def a(n): return a057889(3*n)//3 print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 11 2017
-
Scheme
(define (A246200 n) (/ (A057889 (* 3 n)) 3))
Formula
a(n) = A057889(3*n) / 3.
Comments