%I #12 Apr 21 2021 11:55:51
%S 0,1,0,1,1,2,5,27,167,5204,177103,14527650,959002003,94955725947,
%T 4084055217724,179793385305803,120106065439494128,
%U 183522247784932333387,256013655766046044568993,173321428475860957105541648
%N a(0) = 0, a(1) = 1, a(n) = (a(n-1) mod F(n))*a(n-1) + a(n-2) for n > 2 where F(n) is the n-th Fibonacci number.
%C The fractional portion of a(n)/a(n-1) exponentially approaches 0 as n increases.
%H G. C. Greubel, <a href="/A097565/b097565.txt">Table of n, a(n) for n = 0..100</a>
%t RecurrenceTable[{a[0]==0,a[1]==1,a[n]==Mod[a[n-1],Fibonacci[n]]a[n-1]+ a[n-2]}, a,{n,20}] (* _Harvey P. Dale_, Jul 06 2016 *)
%o (Magma)
%o a:= func< n | n le 2 select n-1 else (Self(n-1) mod Fibonacci(n-1))*Self(n-1) + Self(n-2) >;
%o [a(n): n in [1..21]]; // _G. C. Greubel_, Apr 20 2021
%o (Sage)
%o @CachedFunction
%o def a(n): return n if (n<2) else (a(n-1)%fibonacci(n))*a(n-1) + a(n-2)
%o [a(n) for n in (0..20)] # _G. C. Greubel_, Apr 20 2021
%K nonn
%O 0,6
%A _Gerald McGarvey_, Aug 27 2004
|