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 A246675 #23 Apr 02 2017 00:47:22 %S A246675 1,2,3,4,5,8,7,6,9,16,11,32,13,10,15,64,17,128,19,18,21,256,23,12,25, %T A246675 14,27,512,29,1024,31,26,33,20,35,2048,37,42,39,4096,41,8192,43,22,45, %U A246675 16384,47,24,49,50,51,32768,53,36,55,66,57,65536,59,131072,61,38,63,52,65,262144,67,74,69 %N A246675 Permutation of natural numbers: a(n) = A000079(A055396(n+1)-1) * ((2*A246277(n+1))-1). %C A246675 Consider the square array A246278, and also A246275 which is obtained from the former when one is subtracted from each term. %C A246675 In A246278 the even numbers occur at the top row, and all the rows below that contain only odd numbers, those subsequent terms in each column having been obtained by shifting all primes present in the prime factorization of number immediately above to one larger indices with A003961. %C A246675 To compute a(n): we do the same process in reverse, by shifting primes in the prime factorization of n+1 step by step to smaller primes, until after k >= 0 such shifts with A064989, the result is even, with the smallest prime present being 2. %C A246675 We subtract one from this even number and shift the binary expansion of the resulting odd number k positions left (i.e. multiply it with 2^k), which will be the result of a(n). %C A246675 In the essence, a(n) tells which number in the array A135764 is at the same position where n is in the array A246275. 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 A246675 A055396(n+1) tells on which row of A246275 n is, which is equal to the row of A246278 on which n+1 is. %C A246675 A246277(n+1) tells in which column of A246275 n is, which is equal to the column of A246278 in which n+1 is. %H A246675 Antti Karttunen, <a href="/A246675/b246675.txt">Table of n, a(n) for n = 1..2048</a> %H A246675 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246675 a(n) = A000079(A055396(n+1)-1) * ((2*A246277(n+1))-1). %F A246675 As a composition of related permutations: %F A246675 a(n) = A135764(A246276(n)). %F A246675 a(n) = A054582(A246274(n)-1). %F A246675 Other identities. For all n >= 0: %F A246675 a(A005408(n)) = A005408(n). [Fixes the odd numbers.] %e A246675 Consider 54 = 55-1. To find 55's position in array A246278, we start shifting its prime factorization 55 = 5 * 11 = p_3 * p_5, step by step: p_2 * p_4 (= 3 * 7 = 21), until we get an even number: p_1 * p_3 = 2*5 = 10. %e A246675 This tells us that 55 is on row 3 and column 5 (= 10/2) of array A246278, thus 54 occurs in the same position at array A246275. In array A135764 the same position contains number (2^(3-1)) * (10-1) = 4*9 = 36, thus a(54) = 36. %o A246675 (PARI) %o A246675 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A246675 A246675(n) = { my(k=0); n++; while((n%2), n = A064989(n); k++); n--; while(k>0, n = 2*n; k--); n; }; %o A246675 for(n=1, 2048, write("b246675.txt", n, " ", A246675(n))); %o A246675 (Scheme) (define (A246675 n) (* (A000079 (- (A055396 (+ 1 n)) 1)) (-1+ (* 2 (A246277 (+ 1 n)))))) %Y A246675 Inverse: A246676. %Y A246675 More recursed variants: A246677, A246683. %Y A246675 Even bisection halved: A246679. %Y A246675 Other related permutations: A054582, A135764, A246274, A246275, A246276. %Y A246675 Cf. A000079, A003961, A005408, A055396, A064989, A246277, A246278. %Y A246675 a(n) differs from A156552(n+1) for the first time at n=13, where a(13) = 14, while A156552(14) = 17. %K A246675 nonn %O A246675 1,2 %A A246675 _Antti Karttunen_, Sep 01 2014