|
|
A072950
|
|
Number of permutations p of (1,2,3,...,n) such that at least one value of abs(k-p(k)) is prime.
|
|
0
|
|
|
0, 0, 3, 19, 107, 691, 4929, 39958, 361114, 3617842, 39839167, 478446607, 6222389995, 87141729459, 1307336091119, 20919193567746, 355645495960717, 6401893756352511, 121639082125097830, 2432829344591803920, 51089970941577272512, 1123986359392616081280, 25851788572429206208046, 620444847283311945960411, 15511151016762411683607733, 403290394935411695227886859, 10888849001142056697750434215, 304887920401982037154914970647, 8841752695810641318540928982492, 265252660423388422894156833658591
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
Definition corrected by Franklin T. Adams-Watters, Dec 07 2006
|
|
STATUS
|
approved
|
|
|
|