cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A385644 Swap multiplication and exponentiation in the canonical prime factorization of n.

This page as a plain text file.
%I A385644 #45 Jul 16 2025 14:26:17
%S A385644 2,3,4,5,8,7,6,6,32,11,64,13,128,243,8,17,64,19,1024,2187,2048,23,216,
%T A385644 10,8192,9,16384,29,
%U A385644 14134776518227074636666380005943348126619871175004951664972849610340958208,31,10,177147,131072,78125,4096,37,524288,1594323,7776,41
%N A385644 Swap multiplication and exponentiation in the canonical prime factorization of n.
%C A385644 In the canonical prime factorization of n larger than one, swap multiplication and exponentiation and calculate the result.
%H A385644 Jens Ahlström, <a href="/A385644/b385644.txt">Table of n, a(n) for n = 2..65</a>
%e A385644 a(6) = a(2 * 3) = 2^3 = 8,
%e A385644 a(24) = a(2^3 * 3) = (2 * 3)^3 = 216,
%e A385644 a(30) = a(2 * 3 * 5) = 2^3^5 = 2^243.
%t A385644 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 *)
%t A385644 A385644[n_] := Power @@ Times @@@ FactorInteger[n];
%t A385644 Array[A385644, 40, 2] (* _Paolo Xausa_, Jul 14 2025 *)
%o A385644 (Python)
%o A385644 from sympy import factorint
%o A385644 from functools import reduce
%o A385644 def rpow(a, b):
%o A385644     return b**a
%o A385644 def a(n):
%o A385644     return reduce(rpow, [p*e for p, e in reversed(factorint(n).items())])
%o A385644 print([a(n) for n in range(2, 42)])
%Y A385644 Cf. A001414, A000026, A005361, A008474.
%K A385644 nonn
%O A385644 2,1
%A A385644 _Jens Ahlström_, Jul 06 2025