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.

A246436 Number of numbers 1,...,n not occurring in the Collatz trajectory starting with n.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 4, 2, 4, 4, 3, 6, 4, 8, 11, 8, 4, 8, 12, 15, 10, 14, 13, 11, 16, 17, 12, 15, 19, 21, 26, 16, 22, 26, 16, 19, 21, 21, 31, 28, 34, 23, 28, 31, 34, 34, 36, 29, 29, 33, 40, 43, 36, 40, 36, 33, 39, 37, 44, 47, 45, 48, 57, 42, 41, 45, 53, 56
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2014

Keywords

Comments

a(n) = n - A159999(n).

Examples

			8-4-2-1: a(8) = #{3,5,6,7} = 4;
9-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1: a(9) = #{3,6} = 2;
10-5-16-8-4-2-1: a(10) = #{3,6,7,9} = 4;
11-34-17-52-26-13-40-20-10-5-16-8-4-2-1: a(11) = #{3,6,7,9} = 4;
12-6-3-10-5-16-8-4-2-1: a(12) = #{7,9,11} = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), genericIndex)
    a246436 n = length $ [1..n] \\ genericIndex a220237_tabf (n - 1)
  • Mathematica
    Table[Length[Complement[Range[n],NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]]],{n,70}] (* Harvey P. Dale, May 27 2018 *)