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.

A049074 Ulam's conjecture (steps to return n to 1 after division by 2 and, if needed, multiplication by 3 with 1 added).

Original entry on oeis.org

8, 3, 49, 7, 36, 55, 288, 15, 339, 46, 259, 67, 119, 302, 694, 31, 214, 357, 519, 66, 148, 281, 633, 91, 658, 145, 101440, 330, 442, 724, 101104, 63, 841, 248, 540, 393, 535, 557, 2344, 106, 101331, 190, 1338, 325, 497, 679, 100979, 139, 806, 708, 1130, 197
Offset: 1

Views

Author

Keywords

Comments

Appeared in School Science and Mathematics in 1982.

Examples

			Beginning at n=1, algorithm produces s+t+a=8.
a(3) = 49 because the trajectory of n=3 is (3, 10, 5, 16, 8, 4, 2, 1) and these numbers sum to 49. - _David Radcliffe_, Aug 28 2025
		

Crossrefs

Almost the same as A033493.
Cf. A049067.

Programs

  • Python
    def a(n):
        if n==1: return 8
        l=[n]
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            l.append(n)
            if n<2: break
        return sum(l)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 14 2017