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.

Original entry on oeis.org

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

Views

Author

Jens Ahlström, Jul 06 2025

Keywords

Comments

In the canonical prime factorization of n larger than one, swap multiplication and exponentiation and calculate the result.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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)])