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.

A232570 Numbers k that divide tribonacci(k) (A000073(k)).

This page as a plain text file.
%I A232570 #55 Jul 28 2024 16:39:26
%S A232570 1,8,16,19,32,47,53,64,103,112,128,144,155,163,192,199,208,221,224,
%T A232570 256,257,269,272,299,311,368,397,401,419,421,448,499,512,587,599,617,
%U A232570 640,683,757,768,773,784,863,883,896,907,911,929,936,991,1021,1024
%N A232570 Numbers k that divide tribonacci(k) (A000073(k)).
%C A232570 Inspired by A023172 (numbers k such that k divides Fibonacci(k)).
%C A232570 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
%C A232570 Includes 2^k for k >= 3. - _Robert Israel_, Jul 26 2024
%H A232570 Seiichi Manyama, <a href="/A232570/b232570.txt">Table of n, a(n) for n = 1..10000</a>
%p A232570 with(LinearAlgebra[Modular]):
%p A232570 T:= (n, m)-> MatrixPower(m, Mod(m, <<0|1|0>,
%p A232570     <0|0|1>, <1|1|1>>, float[8]), n)[1, 3]:
%p A232570 a:= proc(n) option remember; local k; if n=1
%p A232570       then 1 else for k from 1+a(n-1)
%p A232570       while T(k$2)>0 do od; k fi
%p A232570     end:
%p A232570 seq(a(n), n=1..70);  # _Alois P. Heinz_, Feb 05 2018
%t A232570 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 *)
%o A232570 (Ruby)
%o A232570 require 'matrix'
%o A232570 def power(a, n, mod)
%o A232570   return Matrix.I(a.row_size) if n == 0
%o A232570   m = power(a, n >> 1, mod)
%o A232570   m = (m * m).map{|i| i % mod}
%o A232570   return m if n & 1 == 0
%o A232570   (m * a).map{|i| i % mod}
%o A232570 end
%o A232570 def f(m, n)
%o A232570   ary0 = Array.new(m, 0)
%o A232570   ary0[0] = 1
%o A232570   v = Vector.elements(ary0)
%o A232570   ary1 = [Array.new(m, 1)]
%o A232570   (0..m - 2).each{|i|
%o A232570     ary2 = Array.new(m, 0)
%o A232570     ary2[i] = 1
%o A232570     ary1 << ary2
%o A232570   }
%o A232570   a = Matrix[*ary1]
%o A232570   mod = n
%o A232570   (power(a, n, mod) * v)[m - 1]
%o A232570 end
%o A232570 def a(n)
%o A232570   (1..n).select{|i| f(3, i) == 0}
%o A232570 end
%Y A232570 Cf. A000073, A023172, A106279.
%K A232570 nonn
%O A232570 1,2
%A A232570 _Seiichi Manyama_, Jun 17 2016