login
A384204
a(n) is the number of palindromic permutations of the prime factors of n (counted with multiplicity).
2
1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0
OFFSET
1,36
COMMENTS
a(m) = 0 if and only if, in the canonical prime factorization of m, more than one prime has an odd exponent. Equivalently, a(m) > 0 if and only if m is either a perfect square or the product of a perfect square and a prime. A265640 gives the numbers m for which a(m) > 0.
FORMULA
a(q*s^2) = a(s^2) = (Sum_{i=1..k} e_i)!/(Product_{i=1..k} e_i!), where q is prime, s is a positive integer and p_1^e_1*...*p_k^e_k is the canonical prime factorization of s.
a(m) = 0 if m is not of the form q*s^2 or s^2.
EXAMPLE
a(1) = 1 because 1 has an empty factorization, [], which also is a palindrome.
a(72) = a(36) = 2 because 72 = 2*3*2*3*2 = 3*2*2*2*3 and 36 = 2*3*3*2 = 3*2*2*3.
a(144) = 3 because 144 = 2*2*3*3*2*2 = 2*3*2*2*3*2 = 3*2*2*2*2*3.
a(169) = 1 because 169 = 13*13.
MAPLE
A384204:=proc(n)
local i, l;
l:=[seq(i[2], i in ifactors(n)[2])];
if nops(select(x->x mod 2<>0, l))>1 then
0
else
l:=map(x->floor(x/2), l);
return add(l)!/(mul(i!, i in l))
fi;
end proc;
seq(A384204(n), n=1..88);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Sep 28 2025
STATUS
approved