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!)
A213181 Number of chains of even numbers of length 2 or more in the Collatz (3x+1) trajectory of n. 2
0, 0, 1, 1, 1, 1, 3, 1, 4, 1, 3, 2, 2, 3, 2, 1, 3, 4, 4, 2, 1, 3, 2, 2, 5, 2, 17, 4, 4, 2, 16, 1, 6, 3, 2, 5, 4, 4, 6, 2, 17, 1, 6, 4, 4, 2, 16, 2, 5, 5, 5, 3, 2, 17, 17, 4, 7, 4, 6, 3, 3, 16, 15, 1, 6, 6, 5, 4, 3, 2, 16, 5, 18, 4, 2, 5, 5, 6, 6, 2, 4, 17, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
A pair of even numbers that appear side by side in Collatz trajectory of n is considered a chain of length 2 and likewise for chains of greater length.
LINKS
EXAMPLE
For n=3, Collatz trajectory of 3 is 3,10,5,16,8,4,2,1, hence the only chain is 16,8,4,2 and so a(3)=1; again for 12: 12,6,3,10,5,16,8,4,2,1 and as such there are two chains 12,6 and 16,8,4,2 so a(12)=2
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[c = Collatz[n]; cnt = 0; evenCnt = 0; Do[If[OddQ[i], evenCnt = 0, evenCnt++; If[evenCnt == 2, cnt++]], {i, c}]; cnt, {n, 100}] (* T. D. Noe, Feb 28 2013 *)
CROSSREFS
Cf. A070165.
Sequence in context: A090740 A094603 A165595 * A301848 A325610 A278536
KEYWORD
nonn
AUTHOR
Jayanta Basu, Feb 28 2013
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 April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)