OFFSET
0,2
COMMENTS
A392781 is an additive sequence with A392781(2^e) = (e + e mod 2)/2, and A392781(p^e) = e*(p-1)/2, p an odd prime. Consequently, every k such that A392781(k) = n decomposes into a partition of n. Specifically, if P(n) is the set of partitions of n and A(n) the set of those k such that A392781(k) = n (and thus |A(n)| = a(n)), then there is a function f : A(n) -> P(n) which is noninjective for n > 0 and surjective only when n <= 2.
a(n) is equivalent to the number of nondistinct partitions x_1 + ... x_m of n under the conditions that x_i is chosen from one of the following sets and no two x_i <> x_j are chosen from the same set: the prime ideals pZ of the integers Z which contain n; Z itself; and a multiset S = {1, 1, 2, 2, 3, 3, ...} where every element of Z appears twice. From this it follows that k = 2^(2*n) is the largest k such that A392781(k) = n.
LINKS
Miles Englezou, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: (1 + x)/((1 - x)*Product_{odd prime p} (1 - x^((p-1)/2))). - Andrew Howroyd, Jan 25 2026
EXAMPLE
n = 2 can be partitioned in 6 nondistinct ways under the conditions described in the comments.
The 6 numbers k such that A392781(k) = 2 are 5, 6, 8, 9, 12, 16, and they decompose in the following way:
A392781(5) = (5 - 1)/2 = 2 = 2
A392781(6) = (1 + 1)/2 + (3 - 1)/2 = 1 + 1 = 2
A392781(8) = (3 + 1)/2 = 2 = 2
A392781(9) = 2*(3 - 1)/2 = 2 = 2
A392781(12) = (2 + 0)/2 + (3 - 1)/2 = 1 + 1 = 2
A392781(16) = (4 + 0)/2 = 2 = 2
The sets from which the summands can be chosen are:
{1, 1, 2, 2, 3, 3, 4, 4, ...} = S
{1, 2, 3, 4, 5, 6, 7, 8, ...} = Z
{2, 4, 6, 8, 10, 12, 14, 16, ...} = 2Z
And the 6 partitions are:
(1_{S,1} + 1_Z), (1_{S,2} + 1_Z), (2_{S,1}), (2_{S,2}), (2_Z), (2_2Z).
---------------------------------------------------------------------------
n = 3 can be partitioned in 11 nondistinct ways under the conditions described in the comments.
The 11 numbers k such that A392781(k) = 3 are 7, 10, 15, 18, 20, 24, 27, 32, 36, 48, 64, and they decompose in the following way:
A392781(7) = (7 - 1)/2 = 3 = 3
A392781(10) = (1 + 1)/2 + (5 - 1)/2 = 1 + 2 = 3
A392781(15) = (3 - 1)/2 + (5 - 1)/2 = 1 + 2 = 3
A392781(18) = (1 + 1)/2 + 2*(3 - 1)/2 = 1 + 2 = 3
A392781(20) = (2 + 0)/2 + (5 - 1)/2 = 1 + 2 = 3
A392781(24) = (3 + 1)/2 + (3 - 1)/2 = 2 + 1 = 3
A392781(27) = 3*(3 - 1)/2 = 3 = 3
A392781(32) = (5 + 1)/2 = 3 = 3
A392781(36) = (2 + 0)/2 + 2*(3 - 1)/2 = 1 + 2 = 3
A392781(48) = (3 + 1)/2 + (3 - 1)/2 = 2 + 1 = 3
A392781(64) = (6 + 0)/2 = 3 = 3
The sets from which the summands can be chosen are:
{1, 1, 2, 2, 3, 3, 4, 4, ...} = S
{1, 2, 3, 4, 5, 6, 7, 8, ...} = Z
{2, 4, 6, 8, 10, 12, 14, 16, ...} = 2Z
{3, 6, 9, 12, 15, 18, 21, 24, ...} = 3Z
And the 11 partitions are:
(1_{S,1} + 2_Z), (1_{S,2} + 2_Z), (1_{S,1} + 2_2Z), (1_{S,2} + 2_2Z), (1_Z + 2_{S,1}), (1_Z + 2_{S,2}), (1_Z + 2_2Z), (3_{S,1}), (3_{S,2}), (3_Z), (3_3Z).
MATHEMATICA
f[p_, e_] := e*(p-1)/2; f[2, e_] := (e + Mod[e, 2])/2; s[1] = 0; s[n_] := Plus @@ f @@@ FactorInteger[n]; a[n_] := Sum[Boole[s[k] == n], {k, 1, 2^(2*n)}]; Array[a, 10, 0] (* Amiram Eldar, Jan 25 2026 *)
PROG
(PARI) A392781(n) = { my(F = factor(n)); sum(i=1, #F~, my([p, e] = F[i, ]); if(p==2, (e+1)\2, e*(p-1)/2)) }
a(n) = { my(nb = 0); for(k=1, 2^(2*n), if(A392781(k) == n, nb++)); nb }
(PARI) seq(n) = Vec((1 + x)/((1 - x)*prod(k=2, primepi(2*n+1), 1 - x^((prime(k)-1)/2) + O(x*x^n)))) \\ Andrew Howroyd, Jan 25 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Miles Englezou, Jan 23 2026
EXTENSIONS
a(15)-a(16) from Amiram Eldar, Jan 25 2026
a(17) onward from Andrew Howroyd, Jan 25 2026
STATUS
approved
