Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078719
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078719 Number of odd terms among n, f(n), f(f(n)), ...., 1 for the Collatz function (that is, until reaching "1" for the first time). +0
5
1, 1, 3, 1, 2, 3, 6, 1, 7, 2, 5, 3, 3, 6, 6, 1, 4, 7, 7, 2, 2, 5, 5, 3, 8, 3, 42, 6, 6, 6, 40, 1, 9, 4, 4, 7, 7, 7, 12, 2, 41, 2, 10, 5, 5, 5, 39, 3, 8, 8, 8, 3, 3, 42, 42, 6, 11, 6, 11, 6, 6, 40, 40, 1, 9, 9, 9, 4, 4, 4, 38, 7, 43, 7, 4, 7, 7, 12, 12, 2, 7, 41, 41, 2, 2, 10, 10, 5, 10, 5, 34, 5, 5, 39 (list; graph; listen)
OFFSET

1,3

COMMENT

The Collatz function (related to the "3x+1 problem") is defined by: f(n) = n/2 if n is even; f(n) = 3n + 1 if n is odd. A famous conjecture states that n, f(n), f(f(n)), .... eventually reaches 1.

LINKS

Index entries for sequences related to 3x+1 (or Collatz) problem

EXAMPLE

The terms n, f(n), f(f(n)), ...., 1 for n = 12 are: 12, 6, 3, 10, 5, 16, 8, 4, 2, 1, of which 3 are odd. Hence a(12) = 3.

MATHEMATICA

f[n_] := Module[{a, i, o}, i = n; o = 1; a = {}; While[i > 1, If[Mod[i, 2] == 1, o = o + 1]; a = Append[a, i]; i = f[i]]; o]; Table[f[i], {i, 1, 100}]

CROSSREFS

Cf. A078720.

Sequence in context: A138881 A070983 A078350 this_sequence A087227 A060477 A080890

Adjacent sequences: A078716 A078717 A078718 this_sequence A078720 A078721 A078722

KEYWORD

nonn

AUTHOR

Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Dec 20 2002

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 8 08:31 EST 2009. Contains 170430 sequences.


AT&T Labs Research