Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A266401
Self-inverse permutation of natural numbers: a(n) = A064989(A263273(A003961(n))).
9
1, 2, 5, 4, 3, 10, 17, 8, 13, 6, 11, 20, 9, 34, 71, 16, 7, 26, 19, 12, 23, 22, 21, 40, 41, 18, 227, 68, 31, 142, 29, 32, 53, 14, 67, 52, 61, 38, 107, 24, 25, 46, 59, 44, 65, 42, 73, 80, 49, 82, 197, 36, 33, 454, 55, 136, 137, 62, 43, 284, 37, 58, 571, 64, 45, 106, 35, 28, 89, 134, 15, 104, 47
OFFSET
1,2
COMMENTS
Shift primes in the prime factorization of n one step towards larger primes (A003961), then apply the bijective base-3 reverse (A263273) to the resulting odd number, which yields another (or same) odd number, then shift primes in the prime factorization of that second odd number one step back towards smaller primes (A064989).
FORMULA
a(n) = A064989(A263273(A003961(n))).
As a composition of related permutations:
a(n) = A064216(A264996(A048673(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
MATHEMATICA
f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; g[p_?PrimeQ] := g[p] = Prime[PrimePi@ p + 1]; g[1] = 1; g[n_] := g[n] = Times @@ (g[First@ #]^Last@ # &) /@ FactorInteger@ n; h[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Table[h@ f@ g@ n, {n, 82}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 and A263273 *)
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.
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
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)};
for(n=1, 6560, write("b266401.txt", n, " ", A266401(n)));
(Scheme) (define (A266401 n) (A064989 (A263273 (A003961 n))))
CROSSREFS
Cf. A265369, A265904, A266190, A266403 (other conjugates or similar sequences derived from A263273).
Sequence in context: A235200 A267099 A266416 * A083798 A197377 A211247
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 02 2016
STATUS
approved