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 A375495 #28 Jun 02 2025 15:27:58 %S A375495 1,1,1,2,1,4,1,1,6,1,3,1,14,1,2,5,5,1,28,1,1,4,1,9,5,9,1,48,1,1,2,3, %T A375495 10,1,1,15,5,23,12,2,1,131,1,3,1,4,6,3,20,5,2,1,1,27,5,43,34,25,1,4,1, %U A375495 1,332,1,5,5,2,1,10,8,12,3,37,5,5,4,10,2,1,1,39,5,63,68,67 %N A375495 a(n) = number of different ways of selecting the minimum number of operations chosen from f(x) = 3x+1 and g(x) = floor(x/2) needed to reach n when starting from 1. %C A375495 The minimum number of operations is A375494(n) and that minimum is attained by a(n) different sequences of operations. %o A375495 (Python) %o A375495 from itertools import product %o A375495 seq = [None for _ in range(200)] %o A375495 num = [ 0 for _ in range(len(seq))] %o A375495 for L in range(0, 23): %o A375495 for P in product((True, False), repeat=L): %o A375495 x = 1 %o A375495 for upward in P: %o A375495 x = 3*x+1 if upward else x//2 %o A375495 if x < len(seq): %o A375495 if num[x] == 0 or L < seq[x]: %o A375495 seq[x], num[x] = L, 1 %o A375495 elif L == seq[x]: %o A375495 num[x] += 1 %o A375495 print(', '.join([str(x) for x in num])) %Y A375495 Cf. A375494 (number of operations), A375496 (indices of 1's). %K A375495 nonn %O A375495 0,4 %A A375495 _Russell Y. Webb_, Aug 18 2024