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.

A050132 a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 3*n.

Original entry on oeis.org

1, 6, 3, 12, 15, 7, 21, 10, 5, 2, 33, 16, 8, 4, 45, 22, 11, 54, 27, 13, 63, 31, 69, 34, 17, 78, 39, 19, 9, 90, 93, 46, 23, 102, 51, 25, 111, 55, 117, 58, 29, 14, 129, 64, 32, 138, 141, 70, 35, 150, 75, 37, 18, 162, 81, 40, 20, 174, 87, 43
Offset: 1

Views

Author

Keywords

Comments

This sequence is a permutation of the natural numbers. Sketch of proof: that it is one-to-one is trivial. Inductively, the halving operation can never happen more than 4 times in a row. There are at least 5 multiples of 3 amongst 16m .. 16m+15; by the induction, one of these will be a value a(n) = 3n and then 4 halving operations will get m (if it has not previously appeared). It follows that m will occur in the sequence no later than floor((16m+26)/3). Empirically, it appears that the 26 in this formula could be replaced by 21. The first occurrence of 4 consecutive halvings starts at n = 226, winding up with a(230)=42. - Franklin T. Adams-Watters, Mar 10 2006

Crossrefs

Cf. A050000.