login
A390784
a(n) is the number of positive integers k for which Sum_{i=1..r} p_i = Sum_{i=1..r} e_i = n, where p_1^e_1*...*p_r^e_r is the canonical prime factorization of k.
6
0, 1, 1, 0, 5, 0, 7, 7, 8, 45, 1, 66, 13, 91, 105, 135, 561, 306, 172, 380, 1540, 462, 3543, 575, 4624, 3250, 6175, 21231, 10963, 24650, 13951, 10447, 21856, 93907, 26741, 119735, 38851, 165871, 120251, 366418, 721969, 450344, 186019, 571427, 1442694, 982215, 3005089
OFFSET
1,5
COMMENTS
a(n) is the number of positive integers k for which A008472(k) = A001222(k) = n.
FORMULA
a(n) = Sum_{i=1..A024936(n)} T(n,i)*binomial(n-1,i-1), where T(n,i) is the number of partitions of n into i distinct prime parts.
EXAMPLE
The a(5) = 5 positive integers are 2^4*3^1 = 48, 2^3*3^2 = 72, 2^2*3^3 = 108, 2^1*3^4 = 162, 5^5 = 3125.
MAPLE
# Processes b and T (slightly adapted) by Alois P. Heinz (A219180).
b:=proc(n, i)
option remember;
`if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i-1))[]], 0)))
end:
T:=proc(n)
local l;
l:=b(n, numtheory[pi](n));
while nops(l)>0 and l[-1]=0 do
l:=subsop(-1=NULL, l)
od;
`if`(nops(l)>0, subsop(1=NULL, l), l)
end:
A390784:=proc(n)
local i, l;
l:=T(n);
add(l[i]*binomial(n-1, i-1), i=1..nops(l))
end:
seq(A390784(n), n=1..47);
KEYWORD
nonn
AUTHOR
Felix Huber, Nov 20 2025
STATUS
approved