OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
35 is here because 5 divides 3^3-2 and 7 divides 3^2-2, but 35 divides no 3^x-2.
PROG
(PARI) isA123239(n)=if(!isprime(n), return(0)); if(n<5, return(1)); my(m=Mod(3, n)); while(m!=1, m*=3; if(m==2, return(0))); 1
is(n)=if(n<9||isprime(n), return(0)); my(f=factor(n)[, 1]); for(i=1, #f, if(isA123239(f[i]), return(0))); my(m=Mod(3, n)); while(m!=1, m*=3; if(m==2, return(0))); 1 \\ Charles R Greathouse IV, Jul 07 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
A.K. Devaraj, Jul 23 2007
EXTENSIONS
Edited by Don Reble, Aug 04 2007
STATUS
approved