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-3 of 3 results.

A221468 The Collatz (3x+1) iteration in A220145 converted to decimal.

Original entry on oeis.org

1, 2, 133, 4, 33, 266, 67733, 8, 541865, 66, 16933, 532, 529, 135466, 135253, 16, 4233, 1083730, 1083717, 132, 129, 33866, 33813, 1064, 8669737, 1058, 2678946987458595510314019806849701, 270932, 270929, 270506, 83717093358081109697313118964053, 32, 69357897
Offset: 1

Views

Author

T. D. Noe, Jan 17 2013

Keywords

Comments

Sequence A005186 tells how many of these numbers are in [2^n, 2^(n+1)-1].
From Rémy Sigrist, Aug 19 2017: (Start)
a(2^n) = 2^n for any n >= 0.
A000120(a(n)) - 1 = A006667(n) for any n > 0.
A070939(a(n)) - 1 = A006577(n) for any n > 0.
All terms are Fibbinary numbers (A003714).
(End)

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[#, 2] &@ Boole@ OddQ@ Reverse@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], {n, 33}] (* Michael De Vlieger, Aug 19 2017 *)
  • PARI
    a(n) = my (v=0, p=1); while (n>1, if (n%2, n = 3*n+1; v += p, n = n/2); p *= 2); return (p+v) \\ Rémy Sigrist, Aug 19 2017

A221467 The Collatz (3x+1) iteration in A220145 sorted and converted to decimal.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 33, 64, 66, 128, 129, 132, 133, 256, 258, 264, 266, 512, 513, 516, 528, 529, 532, 1024, 1026, 1032, 1056, 1058, 1064, 2048, 2049, 2052, 2064, 2112, 2113, 2116, 2128, 4096, 4098, 4104, 4105, 4128, 4224, 4226, 4232, 4233, 4256, 8192, 8193
Offset: 1

Views

Author

T. D. Noe, Jan 17 2013

Keywords

Comments

Sequence A005186 tells how many of these numbers are in [2^n, 2^(n+1)-1].

A176999 An encoding of the Collatz iteration of n.

Original entry on oeis.org

1, 1111010, 11, 11110, 11110101, 1111011101101010, 111, 1111011101101010110, 111101, 11110111011010, 111101011, 111101110, 11110111011010101, 11110111110101010, 1111, 111101110110, 11110111011010101101, 11110111011010111010, 1111011, 1111110, 111101110110101
Offset: 2

Views

Author

T. D. Noe, Apr 30 2010

Keywords

Comments

Working from right to left, the sequence of 0's and 1's in a(n) encode, respectively, the sequence of 3x+1 and x/2 steps in the Collatz iteration of n. This is reverse one's complement of Garner's parity vector. Criswell mentions this encoding.
The length of a(n) is A006577(n). The number of 1's in a(n) is A006666(n). The number of 0's in a(n) is A006667(n). The number of terms having length k is A005186(k).

Examples

			a(5)=11110 because the Collatz iteration for 5 is a 3x+1 step (0) followed by 4 x/2 steps (four 1's).
		

Crossrefs

Programs

  • Mathematica
    encode[n_]:=Module[{m=n,p,lst={}}, While[m>1, p=Mod[m,2]; AppendTo[lst,1-p]; If[p==0, m=m/2, m=3m+1]]; FromDigits[Reverse[lst]]]; Table[encode[n], {n,2,26}]
Showing 1-3 of 3 results.