|
|
A073090
|
|
Number of permutations p from (1,2,3,...,n) to (1,2,3...,n) such that 1/p(1)+2/p(2)+...+n/p(n) is an integer.
|
|
3
|
|
|
1, 1, 1, 1, 2, 2, 8, 8, 22, 104, 1128, 1128, 14520, 14520, 229734, 3217088
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
p(1,2)=(1,2) is the only permutation such that 1/p(1)+2/p(2) is an integer hence a(2)=1.
a(4) = 2: 1234, 2431.
a(5) = 2: 12345, 24315.
a(6) = 8: 123456, 146253, 216453, 243156, 312654, 342651, 621354, 641352.
a(7) = 8: 1234567, 1462537, 2164537, 2431567, 3126547, 3426517, 6213547, 6413527.
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, sum(k=1, n!, if(frac(sum(i=1, n, i/component(numtoperm(n, k), i))), 0, 1)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|