login
A064988
Multiplicative with a(p^e) = prime(p)^e.
28
1, 3, 5, 9, 11, 15, 17, 27, 25, 33, 31, 45, 41, 51, 55, 81, 59, 75, 67, 99, 85, 93, 83, 135, 121, 123, 125, 153, 109, 165, 127, 243, 155, 177, 187, 225, 157, 201, 205, 297, 179, 255, 191, 279, 275, 249, 211, 405, 289, 363, 295, 369, 241, 375, 341, 459, 335, 327
OFFSET
1,2
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).
a(n) = A003961(A290641(n)).
A046523(a(n)) = A046523(n). [Preserves the prime signature of n].
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
Cf. A000040, A003961, A003963 (a left inverse), A006450, A048767, A257538, A290641.
Cf. A076610 (terms sorted into ascending order).
Sequence in context: A069205 A319987 A319985 * A166699 A191110 A178443
KEYWORD
mult,nonn
AUTHOR
Vladeta Jovovic, Oct 30 2001
STATUS
approved