OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(1458) = a(2 * 3^6) = 3^a(6) = 3^a(2*3) = 3^3 = 27.
MAPLE
f:= proc(n) option remember;
local F, t;
F:= ifactors(n)[2];
t:= F[max[index](map(t -> t[1], F))];
t[1]^procname(t[2]);
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jan 07 2019
MATHEMATICA
Nest[Append[#, Last@ FactorInteger[Length[#] + 1] /. {p_, e_} :> p^#[[e]] ] &, {1}, 72] (* Michael De Vlieger, Jan 07 2019 *)
PROG
(PARI) a(n) = if (n==1, 1, my (f=factor(n)); f[#f~, 1]^a(f[#f~, 2]))
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jan 05 2019
STATUS
approved