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.
%I A102423 #33 Aug 29 2020 13:17:33 %S A102423 1,1,1,1,1,1,1,17,17,17,1,1,1,17,1,1,1,1,1,1,1,17,1,1,1,1,1,1,1,1,17, %T A102423 1,1,1,17,1,1,17,17,1,1,1,1,1,1,1,1,17,17,1,1,1,1,17,17,1,1,1,1,1,17, %U A102423 17,1,1,1,1,1,17,17,1,1,1,1,1,1,1,17,1,1,1,1,1,1,1,17,17,17,1,1,1,1,1,1,1,1 %N A102423 Start at x=2n+1, iterate the map x -> A337349(x); sequence gives smallest number in the resulting cycle, or -1 if the trajectory never cycles. %C A102423 See A102421 and A337349 for further comments. %H A102423 David A. Corneth, <a href="/A102423/b102423.txt">Table of n, a(n) for n = 0..9999</a> %t A102423 nextx[x_Integer] := Block[{a = x}, a = 3a + 1; While[EvenQ@a, a /= 2]; a = 3a - 1; While[EvenQ@a, a /= 2]; a]; f[n_] := NestWhile[nextx, n, FreeQ[{1, 17, 19, 43, 97, 109, 61}, # ] &]; Table[ If[ f[2n + 1] == 1, 1, 17], {n, 0, 94}] (* _Robert G. Wilson v_, Sep 20 2006; added 61 to comparison set used for detecting cycles, _William P. Orrick_, Aug 24 2020; should be "!" prefixing MemberQ, changed to FreeQ, _Ray Chandler_, Aug 28 2020 *) %Y A102423 Cf. A102421, A122563 (iterations to enter cycle), A337349. %K A102423 nonn %O A102423 0,8 %A A102423 _N. J. A. Sloane_, based on email from Dan Asimov (dasimov(AT)earthlink.net), Sep 15 2006 %E A102423 More terms from _Robert G. Wilson v_, Sep 20 2006 %E A102423 Replaced A102421 by A337349 in NAME. - _R. J. Mathar_, Aug 24 2020