OFFSET
0,1
COMMENTS
If p is prime and gcd(q,p)=1 then p divides (p-1)!*q^(p-1) + 1.
EXAMPLE
a(1) = ((1-1)!*2^(1-1) + 1)/1 = 2
((2-1)!*2^(2-1) + 1)/2 = 3/2 is not an integer
a(2) = ((3-1)!*2^(3-1) + 1)/3 = 3
MATHEMATICA
Select[Table[((n-1)! 2^(n-1)+1)/n, {n, 35}], IntegerQ] (* Harvey P. Dale, Mar 24 2011 *)
PROG
(PARI) for (i=1, 100, if(denominator(((i-1)!*2^(i-1)+1)/i)==1, print(((i-1)!*2^(i-1)+1)/i)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Mohammed Bouayoun (mohammed.bouayoun(AT)sanef.com), Mar 09 2004
EXTENSIONS
Additional term provided by Harvey P. Dale, Mar 24 2011
STATUS
approved