| Author |
Comment/Response |
Peter Pein
|
09/24/12 01:51am
Hi Jared,
don't forget 'FixedPointList'!
with the special case for n=1, I get:
A002217[1] = 2;(*Why??*)
A002217[n_Integer /; n > 1] :=
Length[FixedPointList[Plus @@ Times @@@ FactorInteger[#] &, n]] - 1
and e.g.
Grid@Partition[Array[A002217, 125], 25]
gives
2 1 1 1 1 2 1 3 3 2 1 2 1 4 4 4 1 4 1 4 3 2 1 4 3
5 4 2 1 3 1 3 5 2 3 3 1 4 5 2 1 3 1 5 2 4 1 2 5 3
5 2 1 2 5 2 3 2 1 3 1 6 2 3 5 5 1 4 6 5 1 3 1 6 2
2 5 5 1 2 3 2 1 5 3 3 4 2 1 2 5 5 3 6 5 2 1 5 2 5
1 3 1 2 5 6 1 2 1 5 3 5 1 5 3 6 2 2 5 5 3 3 6 4 5
hth,
Peter
URL: , |
|