login
A266407
Permutation of natural numbers: a(n) = A064989(A263273((2*n)-1)).
4
1, 2, 5, 3, 4, 17, 11, 10, 9, 7, 6, 19, 13, 8, 21, 31, 34, 71, 29, 22, 61, 25, 20, 59, 41, 18, 73, 23, 14, 33, 43, 12, 53, 37, 38, 35, 15, 26, 67, 47, 16, 157, 107, 42, 145, 55, 62, 197, 69, 68, 179, 113, 142, 129, 39, 58, 191, 137, 44, 45, 49, 122, 227, 101, 50, 199, 151, 40, 121, 57, 118, 211, 89, 82, 111, 149, 36, 91, 85
OFFSET
1,2
FORMULA
a(n) = A064989(A263273((2*n)-1)).
PROG
(PARI)
A030102(n) = { my(r=[n%3]); while(0<n\=3, r=concat(n%3, r)); subst(Polrev(r), x, 3); } \\ After M. F. Hasler's Nov 04 2011 code in A030102.
A263273 = n -> if(!n, n, A030102(n/(3^valuation(n, 3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary.
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)};
A266407 = n -> A064989(A263273((2*n)-1));
for(n=1, 9842, write("b266407.txt", n, " ", A266407(n)));
(Scheme) (define (A266407 n) (A064989 (A263273 (+ n n -1))))
CROSSREFS
Inverse: A266408.
Cf. also A064216, A266401, A266403.
Sequence in context: A309157 A261645 A193724 * A249273 A078376 A226123
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 02 2016
STATUS
approved