A246675 Permutation of natural numbers: a(n) = A000079(A055396(n+1)-1) * ((2*A246277(n+1))-1).
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, 14, 27, 512, 29, 1024, 31, 26, 33, 20, 35, 2048, 37, 42, 39, 4096, 41, 8192, 43, 22, 45, 16384, 47, 24, 49, 50, 51, 32768, 53, 36, 55, 66, 57, 65536, 59, 131072, 61, 38, 63, 52, 65, 262144, 67, 74, 69
Offset: 1
Keywords
Examples
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. 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.
Links
Programs
-
PARI
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)}; A246675(n) = { my(k=0); n++; while((n%2), n = A064989(n); k++); n--; while(k>0, n = 2*n; k--); n; }; for(n=1, 2048, write("b246675.txt", n, " ", A246675(n)));
-
Scheme
(define (A246675 n) (* (A000079 (- (A055396 (+ 1 n)) 1)) (-1+ (* 2 (A246277 (+ 1 n))))))
Comments