close
login
A385644
Swap multiplication and exponentiation in the canonical prime factorization of n.
1
2, 3, 4, 5, 8, 7, 6, 6, 32, 11, 64, 13, 128, 243, 8, 17, 64, 19, 1024, 2187, 2048, 23, 216, 10, 8192, 9, 16384, 29, 14134776518227074636666380005943348126619871175004951664972849610340958208, 31, 10, 177147, 131072, 78125, 4096, 37, 524288, 1594323, 7776, 41
OFFSET
2,1
COMMENTS
In the canonical prime factorization of n larger than one, swap multiplication and exponentiation and calculate the result.
LINKS
EXAMPLE
a(6) = a(2 * 3) = 2^3 = 8,
a(24) = a(2^3 * 3) = (2 * 3)^3 = 216,
a(30) = a(2 * 3 * 5) = 2^3^5 = 2^243.
MATHEMATICA
f[{p_, e_}]:=p*e; a[n_]:=Module[{pp=f/@FactorInteger[n]}, r=pp[[-1]]; Do[r=pp[[Length[pp]-i]]^r, {i, 1, Length[pp]-1}]; r]; Array[a, 40, 2] (* James C. McMahon, Jul 11 2025 *)
A385644[n_] := Power @@ Times @@@ FactorInteger[n];
Array[A385644, 40, 2] (* Paolo Xausa, Jul 14 2025 *)
PROG
(Python)
from sympy import factorint
from functools import reduce
def rpow(a, b):
return b**a
def a(n):
return reduce(rpow, [p*e for p, e in reversed(factorint(n).items())])
print([a(n) for n in range(2, 42)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Jens Ahlström, Jul 06 2025
STATUS
approved