Cumple con la secuencia de Tribonacci
$$T_0 = T_1 = 0, T_2 = 1,$$
$$T_n = T_{n-1} + T_{n-2} + T_{n-3}.$$
Prove or disprove that $2 ^ n $ divides $ T_ {2 ^ n} $ for $n > 2 $.
(I think $2 ^ n $ divides $ T_ {2 ^ n} $.)
P.S.
To confirm the ArtW's proposition, I calculate $ T_ {2 ^ n + l} $ mod $2 ^ {n + 2} $ por rubí.
require 'matrix'
def power(a, n, mod)
return Matrix.I(a.row_size) if n == 0
m = power(a, n >> 1, mod)
m = (m * m).map{|i| i % mod}
return m if n & 1 == 0
(m * a).map{|i| i % mod}
end
def f(m, n, mod)
ary0 = Array.new(m, 0)
ary0[0] = 1
v = Vector.elements(ary0)
ary1 = [Array.new(m, 1)]
(0..m - 2).each{|i|
ary2 = Array.new(m, 0)
ary2[i] = 1
ary1 << ary2
}
a = Matrix[*ary1]
(power(a, n, mod) * v)[m - 1]
end
[-2, -1, 0, 1, 2].each{|l|
(1..20).each{|i|
j = 2 ** i + l
# T_j % (2 ** (i + 2))
p [j, f(3, j, 2 ** (i + 2))]
}
}
Salida
[0, 0]
[2, 1]
[6, 7]
[14, 31]
[30, 127]
[62, 255]
[126, 511]
[254, 1023]
[510, 2047]
[1022, 4095]
[2046, 8191]
[4094, 16383]
[8190, 32767]
[16382, 65535]
[32766, 131071]
[65534, 262143]
[131070, 524287]
[262142, 1048575]
[524286, 2097151]
[1048574, 4194303]
[1, 0]
[3, 1]
[7, 13]
[15, 41]
[31, 17]
[63, 33]
[127, 65]
[255, 129]
[511, 257]
[1023, 513]
[2047, 1025]
[4095, 2049]
[8191, 4097]
[16383, 8193]
[32767, 16385]
[65535, 32769]
[131071, 65537]
[262143, 131073]
[524287, 262145]
[1048575, 524289]
[2, 1]
[4, 2]
[8, 24]
[16, 0]
[32, 64]
[64, 128]
[128, 256]
[256, 512]
[512, 1024]
[1024, 2048]
[2048, 4096]
[4096, 8192]
[8192, 16384]
[16384, 32768]
[32768, 65536]
[65536, 131072]
[131072, 262144]
[262144, 524288]
[524288, 1048576]
[1048576, 2097152]
[3, 1]
[5, 4]
[9, 12]
[17, 8]
[33, 80]
[65, 160]
[129, 320]
[257, 640]
[513, 1280]
[1025, 2560]
[2049, 5120]
[4097, 10240]
[8193, 20480]
[16385, 40960]
[32769, 81920]
[65537, 163840]
[131073, 327680]
[262145, 655360]
[524289, 1310720]
[1048577, 2621440]
[4, 2]
[6, 7]
[10, 17]
[18, 49]
[34, 33]
[66, 65]
[130, 129]
[258, 257]
[514, 513]
[1026, 1025]
[2050, 2049]
[4098, 4097]
[8194, 8193]
[16386, 16385]
[32770, 32769]
[65538, 65537]
[131074, 131073]
[262146, 262145]
[524290, 524289]
[1048578, 1048577]