|
|
A064614
|
|
Exchange 2 and 3 in the prime factorization of n.
|
|
14
|
|
|
1, 3, 2, 9, 5, 6, 7, 27, 4, 15, 11, 18, 13, 21, 10, 81, 17, 12, 19, 45, 14, 33, 23, 54, 25, 39, 8, 63, 29, 30, 31, 243, 22, 51, 35, 36, 37, 57, 26, 135, 41, 42, 43, 99, 20, 69, 47, 162, 49, 75, 34, 117, 53, 24, 55, 189, 38, 87, 59, 90, 61, 93, 28, 729, 65, 66, 67, 153, 46
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A self-inverse permutation of the natural numbers.
a(1) = 1, a(2) = 3, a(3) = 2, a(p) = p for primes p > 3 and a(u * v) = a(u) * a(v) for u, v > 0.
A permutation of the natural numbers: a(a(n)) = n for all n and a(n) = n iff n = 6^k * m for k >= 0 and m > 0 with gcd(m, 6) = 1 (see A064615).
|
|
LINKS
|
|
|
FORMULA
|
Completely multiplicative with a(2) = 3, a(3) = 2, and a(p) = p for primes p > 3. - Charles R Greathouse IV, Jun 28 2015
Sum_{k=1..n} a(k) ~ (6/7) * n^2. - Amiram Eldar, Oct 28 2022
Dirichlet g.f.: zeta(s-1)*((2^s-2)*(3^s-3))/((2^s-3)*(3^s-2)). - Amiram Eldar, Dec 30 2022
|
|
EXAMPLE
|
a(15) = a(3*5) = a(3)*a(5) = 2*5 = 10;
a(16) = a(2^4) = a(2)^4 = 3^4 = 81;
a(17) = 17;
a(18) = a(2*3^2) = a(2)*a(3^2) = 3*a(3)^2 = 3*2^2 = 12.
|
|
MATHEMATICA
|
a[n_] := Times @@ Power @@@ (FactorInteger[n] /. {2, e2_} -> {0, e2} /. {3, e3_} -> {2, e3} /. {0, e2_} -> {3, e2}); Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Nov 20 2012 *)
a[n_] := n * Times @@ ({3/2, 2/3}^IntegerExponent[n, {2, 3}]); Array[a, 100] (* Amiram Eldar, Sep 20 2020 *)
|
|
PROG
|
(Haskell)
a064614 1 = 1
a064614 n = product $ map f $ a027746_row n where
f 2 = 3; f 3 = 2; f p = p
(Python)
from operator import mul
from functools import reduce
from sympy import factorint
return reduce(mul, ((5-p if 2<=p<=3 else p)**e for p, e in factorint(n).items())) if n > 1 else n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult,nice,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|