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.
LINKS
Felix Huber, Table of n, a(n) for n = 1..10000
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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Sep 28 2025
STATUS
approved
