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 A246676 #13 Sep 11 2014 18:56:32 %S A246676 1,2,3,4,5,8,7,6,9,14,11,24,13,26,15,10,17,20,19,34,21,44,23,48,25,32, %T A246676 27,124,29,80,31,12,33,74,35,54,37,62,39,76,41,38,43,174,45,134,47, %U A246676 120,49,50,51,64,53,98,55,342,57,104,59,624,61,242,63,16,65,56,67,244,69,224,71,90,73,68 %N A246676 Permutation of natural numbers: a(n) = A242378(A007814(n), (1+A000265(n))) - 1. %C A246676 To compute a(n) we shift its binary representation right as many steps k as necessary that the result were an odd number. Then one is added to that odd number, and the prime factorization of the resulting even number is shifted the same k number of steps towards larger primes, whose product is then decremented by one to get the final result. %C A246676 In the essence, a(n) tells which number in array A246275 is at the same position where n is in the array A135764. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e. a(2n+1) = 2n+1 for all n. %C A246676 Equally: a(n) tells which number in array A246273 is at the same position where n is in the array A054582, as they are the transposes of above two arrays. %H A246676 Antti Karttunen, <a href="/A246676/b246676.txt">Table of n, a(n) for n = 1..8192</a> %H A246676 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246676 a(n) = A242378(A007814(n), (1+A000265(n))) - 1. [Where the bivariate function A242378(k,n) changes each prime p(i) in the prime factorization of n to p(i+k), i.e., it's the result of A003961 iterated k times starting from n]. %F A246676 As a composition of related permutations: %F A246676 a(n) = A246273(A209268(n)). %F A246676 Other identities: %F A246676 For all n >= 0, a(A005408(n)) = A005408(n). [Fixes the odd numbers]. %e A246676 Consider n=36, "100100" in binary. It has to be shifted two bits right that the result were an odd number 9, "1001" in binary. We see that 9+1 = 10 = 2*5 = p_1 * p_3 [where p_k denotes the k-th prime, A000040(k)], and shifting this two steps towards larger primes results p_3 * p_5 = 5*11 = 55, thus a(36) = 55-1 = 54. %o A246676 (PARI) %o A246676 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of _Michel Marcus_ %o A246676 A246676(n) = { my(k=0); while(!(n%2), n = n\2; k++); n++; while(k>0, n = A003961(n); k--); n-1; }; %o A246676 for(n=1, 8192, write("b246676.txt", n, " ", A246676(n))); %o A246676 (Scheme) (define (A246676 n) (+ -1 (A242378bi (A007814 n) (+ 1 (A000265 n))))) ;; Code for A242378bi given in A242378. %Y A246676 Inverse: A246675. %Y A246676 Even bisection halved: A246680. %Y A246676 More recursed versions: A246678, A246684. %Y A246676 Other related permutations: A209268, A246273, A246275, A135764, A054582. %Y A246676 Cf. A000040, A000265, A005408, A007814, A003961, A242378. %K A246676 nonn %O A246676 1,2 %A A246676 _Antti Karttunen_, Sep 01 2014