OFFSET
2,1
EXAMPLE
12!+1 = 13^2*2834329 and 12 is the smallest integer k such that 13 = prime(6) appears in k!+1 factorization, hence a(6)=12
PROG
(PARI) a(n)=if(n<0, 0, s=1; while((s!+1)%prime(n)>0, s++); s)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Aug 20 2002
STATUS
approved