OFFSET
1,3
COMMENTS
LINKS
USAMO, Problem 3, 1991.
FORMULA
EXAMPLE
2, 4, 16, ... mod 6 equal 2, 4, 4, ..., so A014221(k) mod 6 = 4 for all k >= 2, hence a(6) = 2.
PROG
(PARI) a(n) = {c=0; k=1; x=1; d=n; while(k==1, z=x; y=1; b=1; while(z>0, while(y<z, d=eulerphi(d); y++); b=2^b-floor((2^b-1)/d)*d; z=z-1; y=1; d=n); if(c==b, k=0); c=b; x++); x-2; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Dec 07 2018
STATUS
approved