cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A220145 The Collatz (3x+1) iteration mod 2 with bits combined.

Original entry on oeis.org

1, 10, 10000101, 100, 100001, 100001010, 10000100010010101, 1000, 10000100010010101001, 1000010, 100001000100101, 1000010100, 1000010001, 100001000100101010, 100001000001010101, 10000, 1000010001001, 100001000100101010010, 100001000100101000101, 10000100
Offset: 1

Views

Author

T. D. Noe, Jan 17 2013

Keywords

Comments

This is essentially sequence A070165 mod 2 with bits in the same iteration combined. Note that A176999 is similar, but with a different encoding.
It appears that all numbers are distinct. Sequence A005186 tells how many numbers produce bit strings of a given length. Sequence A221468 converts to decimal and A221467 sorts them.

Examples

			For n = 7, the Collatz iteration is 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Looking at these numbers in base 2 and reversing them, we obtain 10000100010010101.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[FromDigits[Mod[Reverse[Collatz[n]], 2]], {n, 30}]

A260592 a(n) = binary odd/even encoding of the iterates in the modified Syracuse algorithm (msa) starting with 2n+1 and continuing up to (but not including) the first iterate less than 2n+1.

Original entry on oeis.org

1100, 10, 1110100, 10, 11010, 10, 1111000, 10, 1100, 10, 11100, 10, 11011111010110111011110100111011011111100111100010101000100, 10, 11111010110111011110100111011011111100111100010101000100, 10, 1100, 10, 11101100, 10, 11010, 10
Offset: 1

Views

Author

Joseph K. Horn and Robert G. Wilson v, Jul 31 2015

Keywords

Comments

For the msa mapping see A260590; if x is odd append 1 and if x is even append 0.
The binary length of a(n) is A260590(n).
For even numbers, 2n, append to f(n) a 0. Example: f(10) = 0, f(5) = 010.
Tallying all the ones and zeros, there appear to be five ones for every four zeros.
Terms sorted in increasing order and duplicates removed: 10, 1100, 11010, 11100, 1101100, 1110100, 1111000, ...
Since msa always starts with an odd number every binary encoding starts with digit 1 and has at least two digits. - Hartmut F. W. Hoft, Nov 05 2015

Examples

			a(1) = 1100 since A260590(1) is 4, the four operations are, in order following the msa mapping scheme: (3x+1)/2, (3x+1)/2, x/2, and finishing with a x/2 mapping.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 2n + 1, lst = {}}, While[k > 2n, If[ OddQ@ k, k = (3k + 1)/2; AppendTo[ lst, 1], k /= 2; AppendTo[ lst, 0]]]; FromDigits@ lst]; Array[f, 22]

Formula

a(n) = b_1 b_2 ... b_k, the binary k-digit number where b_j = 1 when the j-th iterate of msa is odd and b_j = 0 when it is even, where the first k iterates exceed 2n+1, but the (k+1)-st iterate is less than 2n+1. - Hartmut F. W. Hoft, Nov 05 2015

Extensions

Name change by Hartmut F. W. Hoft, Nov 05 2015
Showing 1-2 of 2 results.