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

N. J. A. Sloane njas at research.att.com
Tue Feb 10 06:26:52 CET 2009

I have now had a chance to study A098282 further.

While it is still true that I don't quite agree with Bob Wilson's results,
it is very impressive that he extended the sequence through a(39).
In particular, he finds that a(18) = 112, which I have now
confirmed using Maple but calling on Mma for help when Maple
couldn't compute some values of pi (Mma's PrimePi).

The first time Maple ran into trouble was at the 38th step
of the trajectory of 18.
Maple can't compute pi(544768069) (at least not in 10 minutes),
whereas Mma finds 
In[7]:= PrimePi[544768069]
Out[7]= 28585125
instantly  (this is Maple 11 vs Mma 7)

Bob's Mma program is the following:

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]

This is opaque to me, but obviously is better that the Maple programs
I've seen.

The results Bob found were:


As I said, I don't quite agree with this, since the correct values
for the first 18 terms using my definition are


I'm not too confident of the 18th term, 112, since
it was done by hand, using a mixture of Maple and Mma.
But I am confident of all the other values,
since they were found by our Maple program in A098282.

I wonder if someone (Bob, perhaps?) could modify the Mma 
program so that it reproduces my values
and then extends them out to 39 terms or more?


More information about the SeqFan mailing list