curve(1/(1+exp(-x)), -4, 4)
かつては年金番号の統合ミスとか誤入力とか,今回はワクチン接種記録システムとか。
https://blog.goo.ne.jp/r-de-r/e/f8b88d3e3fa5f0a452bb0d39d2f6a854
https://blog.goo.ne.jp/r-de-r/e/ef134fa356cfdc59c9a39b06871614bc
https://blog.goo.ne.jp/r-de-r/e/ef134fa356cfdc59c9a39b06871614bc
https://blog.goo.ne.jp/r-de-r/e/f8b88d3e3fa5f0a452bb0d39d2f6a854
function pell(n)
x = isqrt(big(n))
(y, z, r, e1, e2, f1, f2) = (x, 1, 2x, 1, 0, 0, 1)
while true
y = r * z - y
z = (n - y * y) ÷ z
r = (x + y) ÷ z
(e1, e2) = (e2, e2 * r + e1)
(f1, f2) = (f2, f2 * r + f1)
(a, b) = (f2, e2)
(b, a) = (a, a * x + b)
a * a - n * b * b == 1 && return (a, b)
end
end
n = 61
a = pell(n) # (1766319049, 226153980)
a[1]^2 - n * a[2]^2 # 1
n = 109
a = pell(n) # (158070671986249, 15140424455100)
a[1]^2 - n * a[2]^2 # 1
n = 181
a = pell(n) # (2469645423824185801, 183567298683461940)
a[1]^2 - n * a[2]^2 # 1
n = 277
a = pell(n) # (159150073798980475849, 9562401173878027020)
a[1]^2 - n * a[2]^2 # 1