0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【第1回】7から1へ。コラッツの逆像を手で数えてみよう

0
Last updated at Posted at 2026-11-15

概要

7から始めると、コラッツ操作は16回で1に着きます。では逆に、「奇数の操作が5回、2で割る操作が11回で1に着く」とだけ言われたら、始点まで戻れるんでしょうか?

実は、各段で何回2で割ったかが分かれば、始点は一つに決まります。各段の回数が分からなくても、候補の列を数えれば始点の個数が出ます。今回はその数え方を手で追ってみます。

7の軌道を奇数だけで書く

奇数 $x$ に $3x+1$ を施し、次の奇数が現れるまで2で割ります。この操作を $c(x)$ と書きます。たとえば $3\cdot7+1=22$ なので、$c(7)=11$ です。

今の奇数 $3x+1$ 何回2で割る? 次の奇数
7 22 1 11
11 34 1 17
17 52 2 13
13 40 3 5
5 16 4 1

奇数から奇数への反復回数を $s$、2で割った総回数を $V$ とします。各段の除算回数の列が $(a_1,\ldots,a_s)$ です。7から1までなら $s=5$、$(a_1,\ldots,a_5)=(1,1,2,3,4)$、$V=11$ なので、通常の操作では $s+V=16$ 回です。

除算回数から始点を逆算する

次の奇数が $u$、その段で2で割った回数が $a$ なら、一つ前の値は $(2^a u-1)/3$ と決まります。では1から、さっきの列を後ろから使ってみましょう。

今の値 $u$ 使う $a$ $(2^a u-1)/3$
1 4 $(16-1)/3=5$
5 3 $(40-1)/3=13$
13 2 $(52-1)/3=17$
17 1 $(34-1)/3=11$
11 1 $(22-1)/3=7$

7に戻ってきました! もし最後の段の除算回数を1とすると、最初の逆算が $(2-1)/3=1/3$ になります。この列には整数の始点がありません。

図の左は1から7まで逆に戻る経路です。矢印に付いた指数を後ろから順に読みます。右は後半で使う深さ2・総除算回数5の剰余の比較で、横線と一致する候補だけが残ります。

01_reverse_and_congruence.png

図を作るPythonコード
import matplotlib.pyplot as plt


def odd_step(x):
    next_value = 3 * x + 1
    exponent = 0
    while next_value % 2 == 0:
        next_value //= 2
        exponent += 1
    return next_value, exponent


values = [7]
exponents = []
while values[-1] != 1:
    value, exponent = odd_step(values[-1])
    values.append(value)
    exponents.append(exponent)

fig, (path, check) = plt.subplots(
    1, 2, figsize=(10, 3.7), layout="constrained",
    gridspec_kw={"width_ratios": [1.4, 1]},
)
path.set_title("Trace backward from 1", loc="left", fontweight="bold")
path.set_xlim(-0.6, len(values) - 0.4)
path.set_ylim(-0.75, 0.9)
path.set_axis_off()
for k, value in enumerate(reversed(values)):
    path.text(
        k, 0, str(value), ha="center", va="center", fontsize=13,
        bbox={"boxstyle": "round,pad=0.35", "fc": "#e4eff7", "ec": "#1a5677"},
    )
for k, exponent in enumerate(reversed(exponents)):
    path.annotate(
        "", xy=(k + 0.69, 0), xytext=(k + 0.31, 0),
        arrowprops={"arrowstyle": "->", "color": "#54707f"},
    )
    path.text(k + 0.5, 0.3, rf"$a={exponent}$", ha="center", fontsize=10)
path.text(2.5, -0.48, r"Backward step: $(2^a u-1)/3$", ha="center")

divisions = 5
first_exponents = list(range(1, divisions))
target = 2**divisions % 9
remainders = [(3 + 2**a) % 9 for a in first_exponents]
colors = ["#c77729" if remainder == target else "#5a899f" for remainder in remainders]
check.bar(first_exponents, remainders, color=colors, width=0.55, zorder=3)
check.axhline(target, color="#8d4316", linestyle="--", label=rf"$2^5\ (\mathrm{{mod}}\ 9)={target}$")
check.set(
    title="Filter candidates for s=2, V=5",
    xlabel=r"First division exponent $a_1$", ylabel="Remainder mod 9",
    xticks=first_exponents, ylim=(0, 8.5),
)
check.grid(axis="y", alpha=0.22, zorder=0)
check.legend(frameon=False, loc="upper right")
assert [a for a, remainder in zip(first_exponents, remainders) if remainder == target] == [1]
fig.savefig("01_reverse_and_congruence.png", dpi=180)

では、逆算の途中を毎回確認せず、式一つで候補を選別できるでしょうか?

合同式を一つ立てる

$v_j=a_1+\cdots+a_j$ を最初の $j$ 段での累計とし、$v_0=0$ とします。始点を $x$、終点を $u$ とすると、順方向の各式をつなぐことで次が成り立ちます。

2^V u = 3^s x + R_s(a),
\qquad
R_s(a)=\sum_{j=0}^{s-1}3^{s-1-j}2^{v_j}.

式の形は、まず2段で見るとすっきりします。中間を $x_1$ とすれば、$2^{a_1}x_1=3x+1$、$2^{a_2}u=3x_1+1$。後者に $2^{a_1}$ を掛けて前者を入れると、$2^{a_1+a_2}u=9x+3+2^{a_1}$ です。段が一つ増えるたびに、前の余りの部分を3倍して、直前の累計に対応する2の冪を足しています。

終点1の場合は次の合同式を使えます。

R_s(a)\equiv 2^V\pmod{3^s}.

たとえば7の例では、累計が $0,1,2,4,7,11$ です。よって $R_5=81+54+36+48+128=347$ で、$(2^{11}-347)/3^5=1701/243=7$ と戻せます。

合同式が通れば、途中も正奇数になる

ここが数え上げに使える理由です。一般の正奇数終点 $u$ について、$R_s(a)\equiv 2^V u\pmod{3^s}$ を仮定します。法3で見ると $R_s(a)$ の最後の項 $2^{v_{s-1}}$ だけが残るので、$2^{a_s}u\equiv1\pmod3$ です。従って一段前の値 $(2^{a_s}u-1)/3$ は正の整数です。分子は奇数なので、その商も奇数です。

さらに、$R_s(a)=3R_{s-1}(a)+2^{v_{s-1}}$ と書いて合同式を3で割ると、一段前の終点について同じ形の合同式が法 $3^{s-1}$ で成り立ちます。これを繰り返せば、途中の値が全部正奇数になります。そのため、順方向に戻したときに割る回数も指定した各 $a_j$ でぴったりです。

#X(s,V)を手で数える

$X(s,V)$ は、すべての成分が正で、和が $V$、かつ終点1の合同式を満たす指数列の集合です。$\#X(s,V)$ はその列の個数。始点からの軌道は一意なので、これは 指定した $s,V$ で1に着く正奇数の始点の個数でもあります。

深さ2では $R_2=3+2^{a_1}$。例えば $V=5$ なら、法9で次を比較するだけです。

$a_1$ $a_2=5-a_1$ $3+2^{a_1}$ を9で割った余り
1 4 5
2 3 7
3 2 2
4 1 1

$2^5=32$ の余りは5。従って該当する列は $(1,4)$ の一つで、始点は $(32-5)/9=3$ です。前に進めても $3\to5\to1$ になっています。

$(s,V)$ 通る指数列 始点
$(2,3)$ なし なし
$(2,4)$ $(2,2)$ 1
$(2,5)$ $(1,4)$ 3
$(2,6)$ $(4,2)$ 5
$(2,10)$ $(2,8),(8,2)$ 113, 85

表の $(2,6)$ に出る5は、$5\to1\to1$ を一つ数えたものです。$X(s,V)$ は指定した段で1にいる条件なので、1に着いた後の自己ループも含まれます。「初めて」の条件は第3回でこの計数から取り出します。

今回扱った研究

岡 將太・岡 万桜「コラッツ予想のステップ数(総停止時間)について」第2節。逆像の指数表示の背景については、Wirsching–Goodwin 表現の簡潔な証明を参照できます。

次回 【第2回】逆像の個数を母関数に詰めると、周期が見えてくる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?