The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008896 3x - 1 sequence starting at 66. 1
66, 33, 98, 49, 146, 73, 218, 109, 326, 163, 488, 244, 122, 61, 182, 91, 272, 136, 68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122, 61, 182, 91, 272, 136, 68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E16.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
FORMULA
a(0) = 66, a(n) = a(n - 1)/2 if a(n - 1) is even, otherwise 3a(n - 1) - 1.
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3# - 1] &, 66, 50] (* or *) PadRight[ {66, 33, 98, 49, 146, 73, 218, 109, 326, 163, 488, 244}, 120, {68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122, 61, 182, 91, 272, 136}] (* Harvey P. Dale, Sep 02 2018 *)
PROG
(Scala) def collatz(n: Int): Int = n % 2 match {
case 0 => n / 2
case _ => 3 * n + 1
}
def collatzSeq(n: Int): LazyList[Int] = LazyList.iterate(n)(collatz)
collatzSeq(-33).take(100).toList.map(_ * -1) // Alonso del Arte, Apr 25 2020
CROSSREFS
Cf. A008880 (3x + 1 sequence starting at 33).
Sequence in context: A271711 A138843 A033386 * A071712 A080592 A059175
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More specific name from Alonso del Arte, Apr 25 2020 (was "x -> x/2 if x even, x -> 3x - 1 if x odd").
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 00:42 EDT 2024. Contains 373139 sequences. (Running on oeis4.)