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.
%I A284447 #34 Apr 24 2021 17:35:22 %S A284447 1,2,3,4,5,6,7,12,13,14,15,8,9,10,11,20,21,22,23,16,17,18,19,28,29,30, %T A284447 31,24,25,26,27,52,53,54,55,48,49,50,51,60,61,62,63,56,57,58,59,36,37, %U A284447 38,39,32,33,34,35,44,45,46,47,40,41,42,43 %N A284447 Permutation of the positive integers: a(n) = A258996(A092569(n)) = A092569(A258996(n)). %C A284447 The permutation is self-inverse. Except for fixed points 1, 2, 3, 4, 5, 6, 7 it consists completely of 2-cycles: (8,12), (9,13), (10,14), (11,15), (16,20), (17,21), (18,22), (19,23), (24,28), (25,29), (26,30), (27,31), (32,52), (33,53), (34,54), (35,55), (36,48), (37,49), (38,50), (39,51), (40,60), ... %C A284447 {A000027, A258996, A092569, a = A258996(A092569)} form a Klein 4-group. %H A284447 Yosu Yurramendi, <a href="/A284447/b284447.txt">Table of n, a(n) for n = 1..32767</a> %o A284447 (R) %o A284447 maxrow <- 8 # by choice %o A284447 a <- 1:3 %o A284447 for(m in 1:maxrow) for(k in 0:(2^m-1)){ %o A284447 if(m%%2 == 1){a[2^(m+1)+ k] <- a[2^m+k] + 2^m %o A284447 a[2^(m+1)+2^m+k] <- a[2^m+k] + 2^(m+1)} %o A284447 else {a[2^(m+1)+ k] <- a[2^m+k] + 2^(m+1) %o A284447 a[2^(m+1)+2^m+k] <- a[2^m+k] + 2^m} %o A284447 } %o A284447 a %o A284447 # _Yosu Yurramendi_, Apr 06 2017 %o A284447 (R) # Given n, compute a(n) by taking into account the binary representation of n %o A284447 maxblock <- 7 # by choice %o A284447 a <- 1:7 %o A284447 for(n in 8:2^maxblock){ %o A284447 ones <- which(as.integer(intToBits(n)) == 1) %o A284447 nbit <- as.integer(intToBits(n))[1:tail(ones, n = 1)] %o A284447 anbit <- nbit %o A284447 anbit[seq(3, length(anbit) - 1, 2)] <- 1 - anbit[seq(3, length(anbit) - 1, 2)] %o A284447 a <- c(a, sum(anbit*2^(0:(length(anbit) - 1)))) %o A284447 } %o A284447 a %o A284447 # _Yosu Yurramendi_, Mar 30 2021 %Y A284447 Analogous to A284120. Similar R-programs: A258996, A332769. %K A284447 nonn %O A284447 1,2 %A A284447 _Yosu Yurramendi_, Apr 06 2017