OFFSET
1,1
COMMENTS
Apart from the case n=4, the limit of the iteration is a prime number.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
EXAMPLE
70 = 2*5*7 -> 2+5+7 = 14 =2*7 -> 2+7=9 = 3^2 -> 3*2=6=2*3 -> 2+3=5 and 70/5=14.
MAPLE
with(numtheory);
A212921:=proc(q)
local a, b, c, d, i, k, n;
print(4);
for n from 5 to q do
if not isprime(n) then a:=n;
while not isprime(a) do
b:=ifactors(a)[2]; c:=nops(b); b:=op(b); d:=0;
if c=1 then d:=b[1]*b[2];
else for k from 1 to c do d:=d+b[k][1]*b[k][2]; od; fi;
a:=d; if isprime(d) then if trunc(n/d)=n/d then lprint(n, d); fi; break; fi; od;
fi;
od;
end:
A212921(10000);
MATHEMATICA
it[n_] := it[n] = Module[{p, e}, {p, e} = Transpose[FactorInteger[n]]; Dot[p, e]]; it2[n_] := FixedPointList[it[#] &, n]; Select[Range[2, 1000], ! PrimeQ[#] && Mod[#, it2[#][[-1]]] == 0 &] (* T. D. Noe, Jun 01 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, May 31 2012
STATUS
approved