OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
PROG
(PARI) v(n) = my(v=[0], k, flag=1); for(i=2, n+1, k=(v[#v]^2+1)%n; v=concat(v, k); for(j=1, i-1, if(v[j]==k, flag=0)); if(flag==0, break())); v;
is(n) = !(v(n)[#v(n)]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Oct 26 2019
STATUS
approved