OFFSET
1,3
FORMULA
Empirically,
PROG
(PARI) A214636(n, N=199)={my(a=[Mod(1, n)]); for(n=1, N-1, a=concat(a, a[n]+(a[n]+1)*prod(k=1, n-1, a[k]))); for(p=1, N\3, forstep(m=N, p+1, -1, a[m]==a[m-p]&next; 3*m>N&next(2); return(m-p+1)); return(1))} /* the 2nd optional parameter must be taken large enough, at least 3 times the period length and starting position. The script returns zero if the period is not found (most probably due to these constraints). */
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved