OFFSET
1,5
FORMULA
a(n) <= A003434(n).
EXAMPLE
4, 4^4, 4^4^4, ... mod 8 equal 4, 0, 0, ..., so A114561(k) mod 8 = 0 for all k >= 2, hence a(8) = 2.
PROG
(PARI) a(n) = {c=0; k=1; x=0; d=n; while(k==1, z=x++; y=0; b=1; while(z>0, while(y++<z, d=eulerphi(d)); b=4^b-floor((4^b-1)/d)*d; z=z-1; y=0; d=n); if(c==b, k=0); c=b); x-1; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Aug 30 2019
STATUS
approved