login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A241909 Self-inverse permutation of natural numbers: a(1)=1, a(p_i) = 2^i, and if n = p_i1 * p_i2 * p_i3 * ... * p_{ik-1} * p_ik, where p's are primes, with their indexes are sorted into nondescending order: i1 <= i2 <= i3 <= ... <= i_{k-1} <= ik, then a(n) = 2^(i1-1) * 3^(i2-i1) * 5^(i3-i2) * ... * p_k^(1+(ik-i_{k-1})). Here k = A001222(n) and ik = A061395(n). 54
1, 2, 4, 3, 8, 9, 16, 5, 6, 27, 32, 25, 64, 81, 18, 7, 128, 15, 256, 125, 54, 243, 512, 49, 12, 729, 10, 625, 1024, 75, 2048, 11, 162, 2187, 36, 35, 4096, 6561, 486, 343, 8192, 375, 16384, 3125, 50, 19683, 32768, 121, 24, 45, 1458, 15625, 65536, 21, 108, 2401 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This permutation maps between the partitions as ordered in A112798 and A241918 (the original motivation for this sequence).
For all n > 2, A007814(a(n)) = A055396(n)-1, which implies that this self-inverse permutation maps between primes (A000040) and the powers of two larger than one (A000079(n>=1)), and apart from a(1) & a(2), this also maps each even number to some odd number, and vice versa, which means there are no fixed points after 2.
A122111 commutes with this one, that is, a(n) = A122111(a(A122111(n))).
Conjugates between A243051 and A242424 and other rows of A243060 and A243070.
LINKS
FORMULA
If n is a prime with index i (p_i), then a(n) = 2^i, otherwise when n = p_i1 * p_i2 * p_i3 * ... p_ik, where p_i1, p_i2, p_i3, ..., p_ik are the primes present (not necessarily all distinct) in the prime factorization of n, sorted into nondescending order, a(n) = 2^(i1-1) * 3^(i2-i1) * 5^(i3-i2) * ... * p_k^(1+(ik-i_{k-1})).
Equally, if n = 2^k, then a(n) = p_k, otherwise, when n = 2^e1 * 3^e2 * 5^e3 * ... * p_k^{e_k}, i.e., where e1 ... e_k are the exponents (some of them possibly zero, except the last) of the primes 2, 3, 5, ... in the prime factorization of n, a(n) = p_{1+e1} * p_{1+e1+e2} * p_{1+e1+e2+e3} * ... * p_{e1+e2+e3+...+e_k}.
From the equivalence of the above two formulas (which are inverses of each other) it follows that a(a(n)) = n, i.e., that this permutation is an involution. For a proof, please see the attached notes.
The first formula corresponds to this recurrence:
a(1) = 1, a(p_k) = 2^k for primes with index k, otherwise a(n) = (A000040(A001222(n))^(A241917(n)+1)) * A052126(a(A052126(n))).
And the latter formula with this recurrence:
a(1) = 1, and for n>1, if n = 2^k, a(n) = A000040(k), otherwise a(n) = A000040(A001511(n)) * A242378(A007814(n), a(A064989(n))).
[Here 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.]
We also have:
a(1)=1, and for n>1, a(n) = Product_{i=A203623(n-1)+2..A203623(n)+1} A000040(A241918(i)).
For all n >= 1, A001222(a(n)) = A061395(n), and vice versa, A061395(a(n)) = A001222(n).
For all n > 1, a(2n-1) = 2*a(A064216(n)).
EXAMPLE
For n = 12 = 2 * 2 * 3 = p_1 * p_1 * p_2, we obtain by the first formula 2^(1-1) * 3^(1-1) * 5^(1+(2-1)) = 5^2 = 25. By the second formula, as n = 2^2 * 3^1, we obtain the same result, p_{1+2} * p_{2+1} = p_3 * p_3 = 25, thus a(12) = 25.
Using the product formula over the terms of row n of table A241918, we see, because 9450 = 2*3*3*3*5*5*7 = p_1^1 * p_2^3 * p_3^2 * p_4^1, that the corresponding row in A241918 is {2,5,7,7}, and multiplying p_2 * p_5 * p_7^2 yields 3 * 11 * 17 * 17 = 9537, thus a(9450) = 9537.
Similarly, for 9537, the corresponding row in A241918 is {1,2,2,2,3,3,4}, and multiplying p_1^1 * p_2^3 * p_3^2 * p_4^1, we obtain 9450 back.
MATHEMATICA
Array[If[# == 1, 1, Function[t, Times @@ Prime@ Accumulate[If[Length@ t < 2, {0}, Join[{1}, ConstantArray[0, Length@ t - 2], {-1}]] + ReplacePart[t, Map[#1 -> #2 & @@ # &, #]]]]@ ConstantArray[0, Transpose[#][[1, -1]]] &[FactorInteger[#] /. {p_, e_} /; p > 0 :> {PrimePi@ p, e}]] &, 56] (* Michael De Vlieger, Jan 23 2020 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(definec (A241909 n) (cond ((<= n 1) n) ((prime? n) (A000079 (A049084 n))) (else (* (A052126 (A241909 (A052126 n))) (expt (A000040 (A001222 n)) (+ 1 (A241917 n)))))))
;; Another recursive version:
(definec (A241909 n) (cond ((<= n 2) n) ((pow2? n) (A000040 (A007814 n))) (else (* (A000040 (A001511 n)) (A242378bi (A007814 n) (A241909 (A064989 n))))))) ;; The function A242378bi is given in A242378.
(define (pow2? n) (let loop ((n n) (i 0)) (cond ((zero? n) #f) ((odd? n) (and (= 1 n) i)) (else (loop (/ n 2) (1+ i)))))) ;; Gives non-false only when n is a power of two.
(Haskell)
a241909 1 = 1
a241909 n = product $ zipWith (^) a000040_list $ zipWith (-) is (1 : is)
where is = reverse ((j + 1) : js)
(j:js) = reverse $ map a049084 $ a027746_row n
-- Reinhard Zumkeller, Aug 04 2014
(PARI) A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m)); \\ Antti Karttunen, Jan 17 2020
CROSSREFS
Cf. also A278220 (= A046523(a(n)), A331280 (its rgs_transform), A331299 (= min(n,a(n))).
{A000027, A122111, A241909, A241916} form a 4-group.
Sequence in context: A338619 A279355 A279356 * A245451 A371183 A368258
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 03 2014, partly inspired by Marc LeBrun's Jan 11 2006 message on SeqFan mailing list.
EXTENSIONS
Typos in the name corrected by Antti Karttunen, May 31 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)