ScratchData LogoScratchData
Back to 3sal2's profile

hailstone

3S3sal2•Created March 3, 2013
hailstone
0
0
95 views
View on Scratch

Description

This program generates the hailstone sequence for a given number n. Begin with a number n. Now, at each step: * Check if n is even. * If n is even, divide n by 2. * If n is odd, multiply n by 3 and then add 1. If n=1, stop this procedure. This program can be used to help investigate the Collatz conjecture. Press space to learn about hailstone numbers.

Project Details

Project ID3146831
CreatedMarch 3, 2013
Last ModifiedMarch 3, 2013
SharedMarch 3, 2013
Visibilityvisible
CommentsAllowed