OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..4000
PROG
(PARI) has(n)=my(f=factor(n)[, 1]); for(i=1, #f, if(n%(f[i]-1)==0 && f[i]>2, return(1))); 0
is(n)=if(n%2, return(0)); if(n%3==0, return(n==6)); if(n%20==0, return(n==20)); if(!has(n), return(0)); my(f=factor(n)[, 1]); for(i=1, #f, if(has(n/f[i]), return(0))); 1 \\ Charles R Greathouse IV, Dec 28 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Dec 28 2016
STATUS
approved