OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1024
MATHEMATICA
Table[FixedPoint[Times @@ Map[#1^#2 & @@ # &, Partition[#, 2, 2] &@ Flatten[FactorInteger[#] /. {p_, e_} /; e >= 2 :> {If[OddQ@ e, {p, 1}, {1, 1}], {NextPrime@ p, Floor[e/2]}}]] &, #] &[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]], {n, 58}] (* Michael De Vlieger, Mar 18 2017 *)
PROG
(PARI)
A034386(n) = prod(i=1, primepi(n), prime(i));
A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) }; \\ From Charles R Greathouse IV, Jun 28 2015
A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i, 1]+1)^(f[i, 2]\2))*((f[i, 1])^(f[i, 2]%2))); };
(Python)
from sympy import primerange, factorint, nextprime
from operator import mul
def P(n): return reduce(mul, [i for i in primerange(2, n + 1)])
def a108951(n):
f = factorint(n)
return 1 if n==1 else reduce(mul, [P(i)**f[i] for i in f])
def a097246(n):
f=factorint(n)
return 1 if n==1 else reduce(mul, [(nextprime(i)**int(f[i]/2))*(i**(f[i]%2)) for i in f])
def a097248(n):
k=a097246(n)
while k!=n:
n=k
k=a097246(k)
return k
def a(n): return a097248(a108951(n)) # Indranil Ghosh, May 15 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2017
STATUS
approved