%I #19 Jul 04 2022 13:56:30
%S 1,0,1,3,1,1,0,1,1,7,4,1,199,1,4,843,1,1,0,1,29,123,4,1,3,199,4,39603,
%T 29,1,5778,1,1,7,4,17622890,12752043,1,4,39603,7881196,1,5778,1,29,7,
%U 4,1,3,1149851,28143689044,7,29,1,0,312119004790,6643838879,7,4,1
%N a(n) = L(L(n)) mod L(n), where L = Lucas numbers = A000032.
%H Alois P. Heinz, <a href="/A338638/b338638.txt">Table of n, a(n) for n = 0..4795</a>
%F a(n) = A005371(n) mod A000032(n).
%F a(n) = 0 for n in { A016089 }.
%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-> (f-> b(f$2) mod f)(b(n)):
%p seq(a(n), n=0..60);
%t Table[Mod[LucasL[LucasL[n]],LucasL[n]],{n,0,60}] (* _Harvey P. Dale_, Jul 04 2022 *)
%Y Cf. A000032, A005371, A016089, A213060, A263101, A338736, A338889.
%K nonn,look
%O 0,4
%A _Alois P. Heinz_, Nov 04 2020