login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A222598 Least number k having Collatz (3x+1) sequence with exactly n pairs of odd and even numbers in a row. 1
5, 3, 7, 15, 159, 27, 127, 255, 511, 1023, 1819, 4095, 4255, 16383, 32767, 65535, 77671, 262143, 459759, 1048575, 2097151, 4194303, 7456539, 16777215, 33554431, 67108863, 134217727, 268435455, 125687199, 1073741823, 2147483647, 4294967295, 8589934591 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This sequence is very similar to A213215. It is somewhat surprising that many of these numbers are of the form 2^k - 1. Note that this is true for n = 2, 3, 4, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, and 33; not true for n = 1, 5, 6, 11, 13, 17, 19, 23, and 29.

LINKS

Table of n, a(n) for n=1..33.

EXAMPLE

The Collatz sequence of 15 is 15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1. It begins with 4 pairs of odd/even numbers.

MATHEMATICA

Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countOnes[t_] := Module[{mx = 0, cnt = 0, i = 0}, While[i < Length[t], i++; If[t[[i]] == 1, cnt++; i++, If[cnt > mx, mx = cnt]; cnt = 0]]; mx]; nn = 15; t = Table[0, {nn}]; t[[1]] = 1; n = 1; While[Min[t] == 0, n = n + 2; c = countOnes[Mod[Collatz[n], 2]]; If[c <= nn && t[[c]] == 0, t[[c]] = n]]; t

CROSSREFS

Cf. A213215.

Sequence in context: A219336 A280235 A135765 * A221470 A030669 A030679

Adjacent sequences:  A222595 A222596 A222597 * A222599 A222600 A222601

KEYWORD

nonn

AUTHOR

T. D. Noe, Mar 02 2013

EXTENSIONS

a(24)-a(33) from Donovan Johnson, Mar 03 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 02:14 EDT 2021. Contains 345055 sequences. (Running on oeis4.)