OFFSET
1,1
COMMENTS
1829 appears so often because the number 27 has a long orbit.
LINKS
Markus Sigg, Table of n, a(n) for n = 1..10000
PROG
(PARI) orbitSize(n, k) = { my(S = Set([])); if (k, n = n % k); while(!setsearch(S, n), S = setunion(S, Set([n])); n = if(n % 2, 3*n+1, n/2); if(k, n = n % k); ); return(#S); };
a(n) = { my(o = orbitSize(n, 0), k); for(k = 1, oo, if(orbitSize(n, k) == o, return(k))); };
makeVec(m) = { my(v = [], n); for(n = 1, m, v = concat(v, a(n))); return(v); };
makeVec(60)
CROSSREFS
KEYWORD
nonn
AUTHOR
Markus Sigg, Aug 17 2020
STATUS
approved