cp's OEIS Frontend

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.

A378375 Number of ways to go from n to 1 by the minimum number of steps of x -> 3x-1 if x odd, x -> 3x-1 or x/2 if x even.

This page as a plain text file.
%I A378375 #12 Jan 01 2025 00:15:07
%S A378375 1,1,1,1,2,1,2,1,1,1,1,1,2,2,1,1,22,2,2,2,3,1,1,1,15,1,2,2,1,1,3,1,15,
%T A378375 34,2,4,8,2,1,2,2,7,1,1,2,2,3,1,11,22,2,2,1,2,8,2,5,1,1,1,1,3,4,1,10,
%U A378375 30,2,1,1,2,1,4,6,15,2,2,1,1,1,2,1,3,6,11
%N A378375 Number of ways to go from n to 1 by the minimum number of steps of x -> 3x-1 if x odd, x -> 3x-1 or x/2 if x even.
%C A378375 The minimum number of steps is A261870(x).
%C A378375 For odd n > 1, a(n) = a(3*n-1) since the first step must be n -> 3n-1.
%C A378375 For even n, a(n) = a(3*n-1) or a(n/2) or their sum a(3*n-1) + a(n/2), depending on which one or both of 3n-1 or n/2 are the minimum steps.
%C A378375 a(2^k) = 1 since the minimum number of steps for 2^k is k steps of x/2..
%C A378375 a(n) = 0 if there's no way to go from n to 1 (if any such n exists).
%H A378375 Kevin Ryde, <a href="/A378375/b378375.txt">Table of n, a(n) for n = 1..10000</a>
%H A378375 Kevin Ryde, <a href="/A261870/a261870_1.c.txt">C Code</a>
%e A378375 For n=20, the a(20) = 2 ways to go from 20 to 1, by the minimum A261870(20) = 12 steps, are
%e A378375   20, 59, 176, 88, 44,  22, 11, 32, 16, 8, 4, 2, 1
%e A378375   20, 10,  29, 86, 43, 128, 64, 32, 16, 8, 4, 2, 1
%e A378375 This is a case where n is even and 3n-1 and n/2 are the same number of steps so that a(n) = a(3*n-1) + a(n/2).
%e A378375 For n=7, the a(7) = 2 ways are by the sole possible step 7 -> 20 since 7 is odd, followed by each of the a(20) = 2 ways shown above.
%o A378375 (C) /* See links. */
%Y A378375 Cf. A261870.
%K A378375 nonn
%O A378375 1,5
%A A378375 _Kevin Ryde_, Nov 25 2024