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.

A127887 Indices of nonzero terms of A127886.

Original entry on oeis.org

9, 18, 27, 28, 31, 33, 36, 37, 39, 41, 43, 47, 49, 50, 54, 55, 56, 57, 59, 62, 63, 65, 66, 71, 72, 73, 74, 78, 79, 82, 83, 86, 87, 89, 91, 94, 95, 97, 98, 99, 100, 103, 105, 107, 108, 109, 110, 111, 112, 114, 115, 118, 119, 121, 123, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 137, 139, 142, 143, 144, 145
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Feb 04 2007

Keywords

Comments

These are the numbers for which allowing the choice of x/2 or 3x+1 in the "3x+1" iteration makes a difference in the minimal number of steps to reach 1.
Thus these are the n for which A006577(n) > A127885(n).

Crossrefs

Programs

  • Mathematica
    Position[#, k_ /; k > 0][[All, 1]] &@ Table[Length@ NestWhileList[If[OddQ@ #, 3 # + 1, #/2] &, n, # > 1 &] - Length@ NestWhileList[Flatten[# /. {k_ /; OddQ@ k :> 3 k + 1, k_ /; EvenQ@ k :> {k/2, 3 k + 1}}] &, {n}, FreeQ[#, 1] &], {n, 126}] (* Michael De Vlieger, Aug 20 2017 *)

Extensions

More terms from Antti Karttunen, Aug 18 2017