OFFSET
1,2
COMMENTS
PROG
(PARI) a(n)=local(ds, p); if(n<=1, return(0)); ds=divisors(n); if(#ds==2, return(n)); p=prod(i=1, #ds-1, (1+x^ds[i])); for(k=0, n, if(polcoeff(p^k, n)!=0, return(k)))
/* The test for #ds==2 is for speed; the program works without it. */
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Aug 29 2009
STATUS
approved