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.

A337212 Modulo 3 Pisano period of 'n-bonacci' series.

This page as a plain text file.
%I A337212 #47 Dec 24 2022 02:30:21
%S A337212 1,8,13,26,104,728,364,80,91,8744,3851,3280,59048,4782968,7174453,
%T A337212 3438578,16139240,5373368,5235412,1678822106,86049704,387420488,
%U A337212 47071589413,140633637386,2952400,728,757,9526168288,7312949144072,49566102697280,24477226494760
%N A337212 Modulo 3 Pisano period of 'n-bonacci' series.
%C A337212 The modulo 2 variant of this sequence gives 1, 3, 4, 5, 6, 7, 8, ... (the natural numbers not including 2), and likewise, when the modulus is a power of 2, it seems that the Pisano period lengths form an arithmetic progression. (Note that both of these observations are based on empirical observation only).
%C A337212 a(39)=797161, a(80)=6560, a(81)=6643, a(90)=5380840, a(242)=59048, a(243)=59293, a(728)=531440, a(729)= 532171, a(2186)=4782968, a(2187)=4785157, a(6560)=43046720, a(6561)=43053283, a(19682)=387420488, a(19683)=387440173. - _Chai Wah Wu_, Sep 15 2020
%F A337212 Conjecture: a(3^k-1)=a(3^k)-3^k-2=3^(2k)-1, a(3^k)=3^k(3^k+1)+1 for k>0. - _Chai Wah Wu_, Sep 15 2020
%e A337212 For n = 3, the remainders modulo 3 of the tribonacci series are 0, 1, 1, 2, 1, 1, 1, 0, 2, 0, 2, 1, 0, (these repeat indefinitely), so the Pisano period of the 'tribonacci' sequence is 13.
%o A337212 (PARI) a(n) = {my(v=w=concat(0, vector(n-1, i, 1))); for(k=1, oo, v=concat(v[2..n], vecsum(v)%3); if(v==w, return(k))); } \\ _Jinyuan Wang_, Aug 20 2020
%o A337212 (Python)
%o A337212 def A337212(n):
%o A337212     x, y, k, r, m = (3**n-3)//2, (3**n-3)//2, (n-1)%3, 3**(n-1), 0
%o A337212     while True:
%o A337212         m += 1
%o A337212         a, b = divmod(x,3)
%o A337212         x, k = a+k*r, (k+k-b)%3
%o A337212         if y == x:
%o A337212             return m # _Chai Wah Wu_, Sep 14 2020
%Y A337212 Cf. A001175 (period of Fibonacci numbers mod n).
%K A337212 nonn
%O A337212 1,2
%A A337212 _Adam Bascal_, Aug 19 2020
%E A337212 a(20)-a(22) from _Jinyuan Wang_, Aug 20 2020
%E A337212 a(23) from _Chai Wah Wu_, Sep 14 2020
%E A337212 a(24)-a(28) from _Chai Wah Wu_, Sep 15 2020
%E A337212 a(29)-a(31) from _Chai Wah Wu_, Sep 21 2020