OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
Index entries for sequences computed from indices in prime factorization (first 1000 terms from Harry J. Smith)
FORMULA
From Antti Karttunen, Aug 08 & 22 2017: (Start)
For n = p_{i1} * p_{i2} * ... * p_{ik}, where the indices i1, i2, ..., ik of primes p are not necessarily distinct, a(n) = A006450(i1) * A006450(i2) * ... * A006450(ik).
A003963(a(n)) = n.
(End)
EXAMPLE
a(12) = a(2^2*3) = prime(2)^2 * prime(3) = 3^2*5 = 45, where prime(n) = A000040(n).
MAPLE
a:= n-> mul(ithprime(i[1])^i[2], i=ifactors(n)[2]):
seq(a(n), n=1..70); # Alois P. Heinz, Sep 06 2018
MATHEMATICA
Table[If[n == 1, 1, Apply[Times, FactorInteger[n] /. {p_, e_} /; p > 1 :> Prime[p]^e]], {n, 58}] (* Michael De Vlieger, Aug 22 2017 *)
PROG
(PARI) { for (n=1, 1000, f=factor(n)~; a=1; for (i=1, length(f), a*=prime(f[1, i])^f[2, i]); write("b064988.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 02 2009
(PARI) a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = prime(f[k, 1]); ); factorback(f); } \\ Michel Marcus, Aug 08 2017
(Scheme) (define (A064988 n) (if (= 1 n) n (* (A000040 (A020639 n)) (A064988 (A032742 n))))) ;; Antti Karttunen, Aug 08 2017
(Python)
from sympy import factorint, prime
from operator import mul
def a(n): return 1 if n==1 else reduce(mul, [prime(p)**e for p, e in factorint(n).items()])
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Aug 08 2017
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
Vladeta Jovovic, Oct 30 2001
STATUS
approved