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.

A106302 Period of the Fibonacci 3-step sequence A000073 mod prime(n).

This page as a plain text file.
%I A106302 #21 Feb 16 2025 08:32:57
%S A106302 4,13,31,48,110,168,96,360,553,140,331,469,560,308,46,52,3541,1860,
%T A106302 1519,5113,5328,3120,287,8011,3169,680,51,1272,990,12883,5376,5720,
%U A106302 18907,3864,7400,2850,8269,162,9296,2494,32221,10981,36673,4656,3234,198,5565
%N A106302 Period of the Fibonacci 3-step sequence A000073 mod prime(n).
%C A106302 This sequence differs from the corresponding Lucas sequence (A106294) at n=1 and 5 because these correspond to the primes 2 and 11, which are the prime factors of -44, the discriminant of the characteristic polynomial x^3-x^2-x-1. We have a(n) < prime(n) for the primes in A106279.
%H A106302 T. D. Noe, <a href="/A106302/b106302.txt">Table of n, a(n) for n = 1..1000</a>
%H A106302 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Fibonaccin-StepNumber.html">Fibonacci n-Step Number</a>
%F A106302 a(n) = A046738(prime(n)).
%t A106302 n=3; Table[p=Prime[i]; a=Join[{1},Table[0,{n-1}]]; a=Mod[a,p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i,60}]
%o A106302 (Python)
%o A106302 from itertools import count
%o A106302 from sympy import prime
%o A106302 def A106302(n):
%o A106302     a = b = (0,)*2+(1 % (p:= prime(n)),)
%o A106302     for m in count(1):
%o A106302         b = b[1:] + (sum(b) % p,)
%o A106302         if a == b:
%o A106302             return m # _Chai Wah Wu_, Feb 27 2022
%Y A106302 Cf. A106273, A106279, A106294, A046738.
%K A106302 nonn
%O A106302 1,1
%A A106302 _T. D. Noe_, May 02 2005, Sep 18 2008