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.

A380244 The Collatz (or 3x+1) trajectory starting at a(n) contains exactly n odd integers and a(n) is the n-th number with this property.

Original entry on oeis.org

1, 10, 12, 68, 45, 30, 72, 101, 134, 179, 237, 314, 422, 551, 723, 509, 1282, 887, 1170, 1535, 2021, 1509, 1899, 2412, 1780, 2217, 3170, 3867, 2819, 3728, 2511, 3155, 3972, 2802, 3578, 2623, 3444, 4302, 3087, 3968, 2690, 1806, 2336, 1593, 2084, 2757, 1884, 2477
Offset: 1

Views

Author

Alois P. Heinz, Jan 17 2025

Keywords

Examples

			a(2) = 10 is the second integer (after 5) having exactly two odd integers in the Collatz trajectory: 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1.
		

Crossrefs

Main diagonal of A354236.

Programs

  • Maple
    b:= proc(n) option remember; irem(n, 2, 'r')+
          `if`(n=1, 0, b(`if`(n::odd, 3*n+1, r)))
        end:
    A:= proc() local h, p, q; p, q:= proc() [] end, 0;
          proc(n, k)
            if k=1 then return 2^(n-1) fi;
            while nops(p(k)) A(n$2):
    seq(a(n), n=1..48);

Formula

A078719(a(n)) = n.