login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A232570
Numbers k that divide tribonacci(k) (A000073(k)).
20
1, 8, 16, 19, 32, 47, 53, 64, 103, 112, 128, 144, 155, 163, 192, 199, 208, 221, 224, 256, 257, 269, 272, 299, 311, 368, 397, 401, 419, 421, 448, 499, 512, 587, 599, 617, 640, 683, 757, 768, 773, 784, 863, 883, 896, 907, 911, 929, 936, 991, 1021, 1024
OFFSET
1,2
COMMENTS
Inspired by A023172 (numbers k such that k divides Fibonacci(k)).
Includes all primes p such that x^3-x^2-x-1 has 3 distinct roots in the field GF(p) (A106279). - Robert Israel, Feb 07 2018
Includes 2^k for k >= 3. - Robert Israel, Jul 26 2024
LINKS
MAPLE
with(LinearAlgebra[Modular]):
T:= (n, m)-> MatrixPower(m, Mod(m, <<0|1|0>,
<0|0|1>, <1|1|1>>, float[8]), n)[1, 3]:
a:= proc(n) option remember; local k; if n=1
then 1 else for k from 1+a(n-1)
while T(k$2)>0 do od; k fi
end:
seq(a(n), n=1..70); # Alois P. Heinz, Feb 05 2018
MATHEMATICA
trib = LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 2000]; Reap[Do[If[Divisible[ trib[[n+1]], n], Print[n]; Sow[n]], {n, 1, Length[trib]-1}]][[2, 1]] (* Jean-François Alcover, Mar 22 2019 *)
PROG
(Ruby)
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)
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]
mod = n
(power(a, n, mod) * v)[m - 1]
end
def a(n)
(1..n).select{|i| f(3, i) == 0}
end
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 17 2016
STATUS
approved