login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A246676
Permutation of natural numbers: a(n) = A242378(A007814(n), (1+A000265(n))) - 1.
12
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, 27, 124, 29, 80, 31, 12, 33, 74, 35, 54, 37, 62, 39, 76, 41, 38, 43, 174, 45, 134, 47, 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
OFFSET
1,2
COMMENTS
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.
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.
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.
FORMULA
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].
As a composition of related permutations:
a(n) = A246273(A209268(n)).
Other identities:
For all n >= 0, a(A005408(n)) = A005408(n). [Fixes the odd numbers].
EXAMPLE
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.
PROG
(PARI)
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
A246676(n) = { my(k=0); while(!(n%2), n = n\2; k++); n++; while(k>0, n = A003961(n); k--); n-1; };
for(n=1, 8192, write("b246676.txt", n, " ", A246676(n)));
(Scheme) (define (A246676 n) (+ -1 (A242378bi (A007814 n) (+ 1 (A000265 n))))) ;; Code for A242378bi given in A242378.
CROSSREFS
Inverse: A246675.
Even bisection halved: A246680.
More recursed versions: A246678, A246684.
Other related permutations: A209268, A246273, A246275, A135764, A054582.
Sequence in context: A130352 A082314 A249811 * A246678 A269384 A249814
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 01 2014
STATUS
approved