login
A080758
Number of steps needed to reach a prime starting with n and iterating x-->floor(3x/2).
0
1, 4, 3, 1, 2, 6, 12, 1, 5, 7, 11, 1, 2, 4, 6, 2, 10, 6, 3, 1, 3, 18, 5, 1, 93, 9, 5, 1, 2, 3, 35, 2, 17, 8, 4, 27, 3, 92, 8, 1, 4, 8, 6, 1, 2, 3, 34, 1, 13, 16, 7, 1, 3, 26, 4, 2, 91, 20, 7, 53, 2, 3, 7, 1, 5, 4, 3, 1, 2, 25, 33, 1, 4, 12, 15, 33, 6, 4, 5, 2, 25, 13, 3, 1, 2, 90, 19, 2, 6, 52, 7, 1
OFFSET
2,2
COMMENTS
If the starting n is itself a prime, it counts as a step but the iteration continues despite its prime status (see the example). [From Harvey P. Dale, Nov 11 2011]
EXAMPLE
3-->4-->6-->9-->13. Hence 4 steps are needed and a(3)=4.
MATHEMATICA
Table[Length[NestWhileList[Floor[(3 #)/2]&, Floor[(3n)/2], !PrimeQ[#]&]], {n, 2, 100}] (* Harvey P. Dale, Nov 11 2011 *)
CROSSREFS
Sequence in context: A278072 A358710 A216482 * A123683 A010306 A197700
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 08 2003
STATUS
approved