%I #9 Nov 14 2020 09:49:13
%S 1,0,3,1,1,1,0,1,1,29,7,1,
%T 19679776435706023589554718882448088434898811874077010905231927243854,
%U 1,7
%N a(n) = L(L(L(n))) mod L(L(n)), where L = Lucas numbers = A000032.
%C a(21) = 2992285359..7163788371 has 5090 decimal digits.
%H Alois P. Heinz, <a href="/A338889/b338889.txt">Table of n, a(n) for n = 0..20</a>
%F a(n) = A262361(n) mod A005371(n).
%p b:= proc(n) local r, M, p; r, M, p:=
%p <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
%p do if irem(p, 2, 'p')=1 then r:=
%p `if`(nargs=1, r.M, r.M mod args[2]) fi;
%p if p=0 then break fi; M:=
%p `if`(nargs=1, M.M, M.M mod args[2])
%p od; (r.<<2, 1>>)[1$2]
%p end:
%p a:= n-> (h-> b(h$2) mod h)(b(b(n))):
%p seq(a(n), n=0..15);
%Y Cf. A000032, A005371, A262361, A274996, A338638, A338736.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Nov 14 2020