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 A078418 #10 Jun 29 2025 19:03:34 %S A078418 6,22,97,108,114,495,559,2972,3092,3124,3147,3154,3329,3367,3483,3643, %T A078418 3711,3748,3756,3982,4009,4767,17435,17782,17796,17863,17892,17897, %U A078418 18079,18139,18422,18580,18644,18688,18784,18804,18952,19739,19868 %N A078418 Numbers k such that h(k) = h(k-1) + h(k-2), where h(k) = A006577(k) + 1 is the length of the sequence {k, f(k), f(f(k)), ...., 1} in the Collatz (or 3x + 1) problem. (The earliest "1" is meant.) %C A078418 Recall that f(n) = n/2 if n is even; = 3n + 1 if n is odd. %e A078418 n, f(n), f(f(n)), ...., 1 for n = 22, 21, 20, respectively, are: 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 21, 64, 32, 16, 8, 4, 2, 1; 20, 10, 5, 16, 8, 4, 2, 1. Hence h(22) = 16 = 8 + 8 = h(21) + h(20) and 22 belongs to the sequence. %t A078418 f[n_] := If[EvenQ[n], n/2, 3n+1]; h[n_] := Module[{a, i}, i=n; a=1; While[i>1, a++; i=f[i]]; a]; Select[Range[3, 19900], h[ # ]==h[ #-1]+h[ #-2]&] %Y A078418 Cf. A006577, A078419, A078420. %K A078418 nonn %O A078418 1,1 %A A078418 _Joseph L. Pe_, Dec 29 2002 %E A078418 Extended by _Robert G. Wilson v_, Dec 30 2002 %E A078418 Name clarified by _Sean A. Irvine_, Jun 29 2025