A258056 3x + 1 sequence starting at 75.
75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4
Offset: 0
Examples
75 is odd, so it's followed by 3*75 + 1 = 226. 226 is even, so it's followed by 226/2 = 113.
Programs
-
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
-
Mathematica
NestList[If[EvenQ[#], #/2, 3# + 1] &, 75, 100]
-
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
Formula
a(0) = 75; a(n) = 3*a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.
Comments