OFFSET
0,1
COMMENTS
a(n) gives the value obtained after n iterations of the Collatz function starting at 75. - Daniel Forgues, May 19 2015
a(n) = 1 for the first time with n = 14 (14 iterations); at this point, we get the trivial (1, 4, 2) cycle... (A153727). - Daniel Forgues, May 22 2015
LINKS
FORMULA
a(0) = 75; a(n) = 3*a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.
EXAMPLE
75 is odd, so it's followed by 3*75 + 1 = 226.
226 is even, so it's followed by 226/2 = 113.
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3# + 1] &, 75, 100]
PROG
(Magma) [n eq 1 select 75 else IsOdd(Self(n-1)) select 3*Self(n-1)+1 else Self(n-1) div 2: n in [1..80]]; // Vincenzo Librandi, May 18 2015
(Sage)
def collatz(start):
a = start
while True:
yield a
a = 3*a + 1 if is_odd(a) else a/2
A258056 = collatz(75)
[next(A258056) for _ in range(60)] # Peter Luschny, May 22 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alonso del Arte, May 17 2015
STATUS
approved