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.
%I A269701 #15 Jun 02 2025 12:16:46 %S A269701 0,1,1,2,3,5,2,1,3,4,1,5,6,5,5,4,3,1,4,5,3,2,5,1,6,1,1,2,3,5,2,1,3,4, %T A269701 1,5,6,5,5,4,3,1,4,5,3,2,5,1,6,1,1,2,3,5,2,1,3,4,1,5,6,5,5,4,3,1,4,5, %U A269701 3,2,5,1,6,1,1,2,3,5,2,1,3,4,1,5,6,5,5,4,3,1,4,5,3,2,5,1,6,1 %N A269701 Cyclic Fibonacci sequence, restricted to maximum=6. %C A269701 Sequence has a period of 24. %H A269701 <a href="/index/Rec#order_24">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1). %F A269701 F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1 and F(n) = F(n-1) + F(n-2) - 6 if F(n-1) + F(n-2) > 6. %F A269701 G.f.: ( -x *(1 +x +2*x^2 +3*x^3 +5*x^4 +2*x^5 +x^6 +3*x^7 +4*x^8 +x^9 +5*x^10 +6*x^11 +5*x^12 +5*x^13 +4*x^14 +3*x^15 +x^16 +4*x^17 +5*x^18 +3*x^19 +2*x^20 +5*x^21 +x^22 +6*x^23) ) / ( (x-1) *(1+x+x^2) *(1+x) *(1-x+x^2) *(1+x^2) *(x^4-x^2+1) *(1+x^4) *(x^8-x^4+1) ). - _R. J. Mathar_, Apr 16 2016 %e A269701 For n = 6; F(5) + F(4) equals 8 then F(6) = 8 - 6 = 2. %p A269701 A269701 := proc(n) %p A269701 option remember; %p A269701 if n <=5 then %p A269701 combinat[fibonacci](n) ; %p A269701 else %p A269701 a := procname(n-1)+procname(n-2) ; %p A269701 if a > 6 then %p A269701 a-6; %p A269701 else %p A269701 a; %p A269701 end if; %p A269701 end if; %p A269701 end proc: # _R. J. Mathar_, Apr 16 2016 %t A269701 Table[Mod[Fibonacci[n], 6], {n, 100}] /. 0 -> 6 (* _Alonso del Arte_, Mar 28 2016 *) %t A269701 PadRight[{0},120,{6,1,1,2,3,5,2,1,3,4,1,5,6,5,5,4,3,1,4,5,3,2,5,1}] (* _Harvey P. Dale_, May 13 2019 *) %o A269701 (Erlang) %o A269701 fibocy(1) -> 1; %o A269701 fibocy(2) -> 1; %o A269701 fibocy(N) when N > 1 -> %o A269701 Tmp = fibocy(N-1) + fibocy(N-2), %o A269701 if Tmp > 6 -> Tmp - 6; %o A269701 true -> Tmp %o A269701 end. %Y A269701 Cf. A000045 (Fibonacci numbers), A082117. %K A269701 nonn,easy,less %O A269701 0,4 %A A269701 _Gabriel Osorio_, Mar 04 2016