OFFSET
1,1
COMMENTS
For n < 1000, there are 8 nonprime terms that are 26, 146, 178, 382, 466, 573, 802, 838.
4252 is the first term that has 3 prime divisors.
Note that 4252 is of the form 4p where p is prime, as are the next 42 such terms; the 44th, 213438, is 2*3*35573. Similarly, the first terms with 4 prime divisors are 1000024, 5921528, 6060344, 7355576, 10427512, 11727704, all of the form 8p with p prime. - Charles R Greathouse IV, Jan 06 2023
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
5 is a term because A054640(5) = 6912 is not divisible by 5.
PROG
(PARI) lista(nn) = for(n=1, nn, if(prod(i=1, n, prime(i)+1) % n != 0, print1(n, ", ")));
(PARI) is(n)=prod(i=1, n, prime(i)+1)%n!=0 \\ Charles R Greathouse IV, Apr 29 2016
(PARI) is(n)=my(m=Mod(1, n)); forprime(p=2, prime(n), m*=p+1; if(m==0, return(0))); 1 \\ Charles R Greathouse IV, Apr 29 2016
(PARI) is(n, f=factor(n), r=prime(n))=for(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); forprimestep(q=p-1, r, p, e-=valuation(q+1, p); if(e<=0, break)); if(e>0, return(1))); 0 \\ Charles R Greathouse IV, Jan 03 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Apr 29 2016
STATUS
approved