login
Ratio of the period and the reduced period of the Fibonacci 3-step sequence A000073 mod prime(n).
3

%I #5 May 01 2013 12:59:40

%S 1,1,1,3,1,3,1,3,1,1,1,1,1,1,1,1,1,3,1,1,3,3,1,1,1,1,3,1,3,1,3,1,1,3,

%T 1,3,1,3,1,1,1,1,1,3,1,3,3,1,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,

%U 1,3,1,1,1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,1,1,1,3

%N Ratio of the period and the reduced period of the Fibonacci 3-step sequence A000073 mod prime(n).

%C For the Fibonacci 3-step (tribonacci) sequence, only 1 and 3 appear. A116515 is the analogous sequence for Fibonacci numbers. Let the terms in the reduced period be denoted by R. When the ratio is 3, the full period can be written as R,aR,bR, where a and b are multipliers that are the two solutions of the equation x^2+x+1 = 0 (mod p). What order do the solutions appear as a and b? See A154755 and A154756 for the primes that produce ratios of 1 and 3, respectively. Observe that there are approximately three times as many 1s as 3s.

%F a(n) = A106302(n) / A154753(n)

%e The tribonacci sequence (starting with 1) mod 7 is 1,1,2,4,0,6,3,2,4, 2,1,0,3,4,0,0,4,4,1,2,0,3,5,1,2,1,4,0,5,2,0,0,2,2,4,1,0,5,6,4,1,4,2,0, 6,1,0,0, which has 3 pairs of 0-0 terms. Hence a(4)=3.

%t Table[p=Prime[i]; a={1,0,0}; a0=a; k=0; zeros=0; While[k++; s=Mod[Plus@@a,p]; a=RotateLeft[a]; a[[ -1]]=s; If[Rest[a]=={0,0}, zeros++ ]; a!=a0]; zeros, {i,200}]

%Y Cf. A046737, A046738.

%K nonn

%O 1,4

%A _T. D. Noe_, Jan 15 2009