# [seqfan] Re: Rank of a prime (Collatz/Syracuse)

Robert G. Wilson, v rgwv at rgwv.com
Sun Feb 1 06:21:19 CET 2009

```et al,

%I A000001
%S A000001
2,3,4,7,5,31,8,55,4,33,6,30,32,1,4,20,9,113,56,16,28,4,4,27,2,21,224,
%T A000001 103,34,14,7,163,2,10,11,76,31,114,22
%N A000001 Number of iterations to repeat a term.
%C A000001 From an idea by Eric Angelini (Eric.Angelini at kntv.be) in the
seqfan blog dtd. Jan 31, 2009.
%t A000001 f[n_] := FromDigits@ Flatten[ IntegerDigits@# & /@ (PrimePi@#
& /@ Flatten[ Table[ First@#, {Last@#}] & /@ FactorInteger at n])]; g[n_]
:= Length@ NestWhileList[f, n, UnsameQ, All] - 1; Array[g, 39]
%Y A000001 Cf. A000040
%K A000001 nonn
%O A000001 1,1
%A A000001 Robert G. Wilson v (rgwv at rgwv.com), Jan 31 2009

Would someone supply a better definition, please.

Thank you, Bob.

Edwin Clark wrote:

>On Sun, 1 Feb 2009, Jacques Tramu wrote:
>
>
>
>>So  the question is :
>>does any sequence terminates in "1"  or with the" 15 23 9 22 15 loop" ?
>>or 25 - ea(25)  is 25 33 25
>>
>>
>
>
>
>The first number I had trouble with was 18. The problem there is
>eventually it gets to the prime 222312455509 and I have difficulty
>figuring out pi(222312455509).
>
>
>
>
>_______________________________________________
>
>Seqfan Mailing list - http://list.seqfan.eu/
>
>
>

```