|
|
A295557
|
|
Let d_1, d_2, d_3, ..., d_tau(n) be the divisors of n; a(n) = number of permutations p of d_1, d_2, d_3, ..., d_tau(n) such that p_(i+1)/p_i is a prime or 1/prime for i = 1,2,...,tau(n)-1.
|
|
2
|
|
|
1, 2, 2, 2, 2, 8, 2, 2, 2, 8, 2, 16, 2, 8, 8, 2, 2, 16, 2, 16, 8, 8, 2, 28, 2, 8, 2, 16, 2, 144, 2, 2, 8, 8, 8, 40, 2, 8, 8, 28, 2, 144, 2, 16, 16, 8, 2, 44, 2, 16, 8, 16, 2, 28, 8, 28, 8, 8, 2, 1168, 2, 8, 16, 2, 8, 144, 2, 16, 8, 144, 2, 124, 2, 8, 16, 16, 8, 144
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MAPLE
|
with(numtheory):
q:= (i, j)-> is(i/j, integer) and isprime(i/j):
b:= proc(s, l) option remember; `if`(s={}, 1, add(
`if`(q(l, j) or q(j, l), b(s minus{j}, j), 0), j=s))
end:
a:= n-> ((s-> add(b(s minus {j}, j), j=s))(divisors(n))):
|
|
MATHEMATICA
|
q[i_, j_] := PrimeQ[i/j];
b[s_, l_] := b[s, l] = If[s == {}, 1, Sum[If[q[l, j] || q[j, l], b[s ~Complement~ {j}, j], 0], {j, s}]];
a[n_] := Function[s, Sum[b[s ~Complement~ {j}, j], {j, s}]][Divisors[n]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|