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.

A337673 a(n) is the sum of all positive integers whose Collatz orbit has length n.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 37, 74, 172, 344, 786, 1572, 3538, 7206, 16252, 33112, 73762, 149967, 330107, 678610, 1498356, 3082302, 6742487, 13855154, 30122440, 62388962, 135783788, 281177482, 608402189, 1259151448, 2711432766, 5646008216, 12172417990, 25339969480, 54409676729, 113159496364
Offset: 0

Views

Author

Markus Sigg, Sep 15 2020

Keywords

Comments

a(n) >= 2^(n-1) as 2^(n-1) has orbit length n.

Examples

			a(6) = 5+32 = 37 as the positive integers whose Collatz orbit has length 6 are {5,32} - the orbit of 5 is 5,16,8,4,2,1, and the orbit of 32 is 32,16,8,4,2,1.
		

Crossrefs

Equals row sums of triangles A088975 and A127824.

Programs

  • PARI
    nextSet(s) = { my(s1 = Set([])); for(i = 1, #s, s1 = setunion(s1, Set([2*s[i]])); if (s[i] > 4 && (s[i]-1) % 3 == 0 && (s[i]-1)/3 % 2 == 1, s1 = setunion(s1, Set([(s[i]-1)/3]))); ); return(s1); }
    a(n) = { my(s = Set([1])); for(k = 1, n, s = nextSet(s); ); return(sum(i=1,#s,s[i])); }

Extensions

More terms from David A. Corneth, Sep 15 2020