OFFSET
1,3
PROG
(PARI) a(n)=sum(k=1, n!, if(sum(i=1, n, isprime(abs(i-component(numtoperm(n, k)), i))), 1, 0))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Aug 20 2002
EXTENSIONS
More terms from Ryan Propper, Jul 21 2006
Definition corrected by Franklin T. Adams-Watters, Dec 07 2006
a(13)-a(14) from Donovan Johnson, Sep 24 2010
a(15)-a(30) from Robert Gerbicz, Nov 21 2010
STATUS
approved