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 A005184 M5220 #95 Aug 06 2025 08:55:00 %S A005184 31,83,293,347,671,19151,2025797 %N A005184 Self-contained numbers: odd numbers k whose Collatz sequence contains a higher multiple of k. %C A005184 The Collatz sequence of a number k is defined as a(1)=k, a(j+1) = a(j)/2 if a(j) is even, 3*a(j) + 1 if a(j) is odd. %C A005184 No others less than 250000000. - Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 07 2006 %C A005184 There are no more terms < 10^11. - _Donovan Johnson_, Nov 28 2013 %C A005184 There are no more terms < 10^15. - _Alun Stokes_, Mar 01 2021 %D A005184 R. K. Guy, Unsolved Problems in Number Theory, E16. %D A005184 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A005184 Alexander Rahn, Max Henkel, Sourangshu Ghosh, Eldar Sultanow, and Idriss Aberkane, <a href="https://hal.archives-ouvertes.fr/hal-03286608">An algorithm for linearizing Collatz convergence</a>, hal-03286608 [math.DS], 2021. %H A005184 Eldar Sultanow, Christian Koch, and Sean Cox, <a href="https://doi.org/10.25932/publishup-48214">Collatz Sequences in the Light of Graph Theory</a>, Universität Potsdam (Germany, 2020). %H A005184 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A005184 The Collatz sequence of 31 is 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310 (see A008884) ... 310 is a multiple of 31, so the number 31 is "self-contained". %p A005184 T:= proc(n) option remember; `if`(n=1, 1, %p A005184 [n, T(`if`(n::even, n/2, 3*n+1))][]) %p A005184 end: %p A005184 q:= n-> ormap(x-> x>n and irem(x, n)=0, [T(n)]): %p A005184 select(q, [2*i-1$i=1..10000])[]; # _Alois P. Heinz_, Aug 04 2025 %t A005184 isSelfContained[n_] := Module[{d}, d = n; While[d != 1, If[EvenQ[d], d = d/2, d = 3 * d + 1]; If[IntegerQ[d/n], Return[True]]]; Return[False]]; For[n = 1, n <= 250000000, n += 2, If[isSelfContained[n], Print[n]]]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 07 2006 *) %t A005184 scnQ[n_] := MemberQ[Divisible[#, n] & / @Rest[NestWhileList[If[EvenQ[#], #/2, 3# + 1] &, n, # > 1 &]], True]; Select[Range[1, 2100001, 2], scnQ] (* _Harvey P. Dale_, Oct 21 2011 *) %o A005184 (PARI) m=5; d=2; while(1,n=(3*m+1)\2; until(n==1,n=if(n%2,3*n+1,n\2); if(n%m==0,print(m," ",n); break)); m+=d; d=6-d) %Y A005184 The ratios "higher multiple of k" / k are given in A059198. %Y A005184 Cf. A070165, A220237, A303698. %K A005184 nonn,more %O A005184 1,1 %A A005184 _N. J. A. Sloane_ %E A005184 More terms from _Robert G. Wilson v_ %E A005184 Better description from _Jack Brennen_, Feb 07 2003