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.

A371595 a(n) is the least period of the 5-step recurrence x(k) = (x(k-1) + x(k-2) + x(k-3) + x(k-4) + x(k-5)) mod prime(n) for initial conditions (x(0),x(1),x(2),x(3),x(4)) other than (0,0,0,0,0) in [0..prime(n)-1]^5.

This page as a plain text file.
%I A371595 #15 Mar 30 2024 12:59:39
%S A371595 1,8,781,2801,16105,30941,88741,9,22,14,190861,1926221,2896405,7,23,
%T A371595 8042221,29,10,66,560,18,39449441,6888,88,32,100,34,132316201,108,16,
%U A371595 42,26,68,46,74,7600,4108,81,83,43,178,45,190,32,98,1576159601,70,37,226,13110,2959999381,3276517921,29040
%N A371595 a(n) is the least period of the 5-step recurrence x(k) = (x(k-1) + x(k-2) + x(k-3) + x(k-4) + x(k-5)) mod prime(n) for initial conditions (x(0),x(1),x(2),x(3),x(4)) other than (0,0,0,0,0) in [0..prime(n)-1]^5.
%C A371595 It appears that a(n) <= (prime(n)^5-1)/(prime(n)-1), with equality in many cases.
%H A371595 Robert Israel, <a href="/A371595/b371595.txt">Table of n, a(n) for n = 1..10000</a>
%H A371595 Robert Israel, <a href="/A371595/a371595_1.pdf">Minimal Period of Linear Recurrences</a>.
%e A371595 a(8) = 9 because prime(3) = 5 and the recurrence has minimal period 9; e.g., with initial values 4, 7, 11, 6, 1 it continues 16, 9, 11, 5, 4, 7, 17, 6, 1, ...
%p A371595 minperiod:= proc(p)
%p A371595   local Q, q, F, i, z, d, k, kp, G, alpha;
%p A371595   Q:= z^5  - z^4 - z^3 - z^2 - z - 1;
%p A371595   F:= (Factors(Q) mod p)[2];
%p A371595   k:= infinity;
%p A371595   for i from 1 to nops(F) do
%p A371595      q:= F[i][1];
%p A371595      d:= degree(q);
%p A371595      if d = 1 then kp:= NumberTheory:-MultiplicativeOrder(p+solve(q, z), p);
%p A371595      else
%p A371595          G:= GF(p, d, q);
%p A371595          alpha:= G:-ConvertIn(z);
%p A371595          kp:= G:-order(alpha);
%p A371595      fi;
%p A371595      k:= min(k,kp);
%p A371595   od;
%p A371595   k;
%p A371595 end proc:
%p A371595 map(minperiod, [seq(ithprime(i),i=1..100)]);
%Y A371595 Cf. A106309.
%K A371595 nonn,look
%O A371595 1,2
%A A371595 _Robert Israel_, Mar 28 2024