A226140 a(n) = Sum_{i=1..floor(n/2)} (n-i)^i.
0, 1, 2, 7, 13, 48, 95, 424, 898, 4837, 10780, 68399, 158111, 1156224, 2745145, 22744380, 55098660, 510307001, 1255610350, 12859037607, 32030878113, 359498491968, 904385401323, 11040700820704, 28000658588542
Offset: 1
Examples
a(6) = 48; 6 has exactly 3 partitions into two parts: (5,1),(4,2),(3,3). Raising the larger parts to their corresponding smaller parts and adding the results, we get: 5^1 + 4^2 + 3^3 = 5 + 16 + 27 = 48.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..773
- Index entries for sequences related to partitions
Crossrefs
Cf. A226065.
Programs
-
Maple
A226140:=n->sum((n-i)^i, i=1..n/2): seq(A226140(n), n=1..40);
-
Mathematica
Array[Sum[(# - i)^i, {i, Floor[#/2]}] &, 25] (* Michael De Vlieger, Jan 23 2018 *) Table[Total[#[[1]]^#[[2]]&/@IntegerPartitions[n,{2}]],{n,30}] (* Harvey P. Dale, Mar 25 2025 *)
-
PARI
a(n) = sum(k=1, n\2, (n-k)^k); \\ Michel Marcus, Dec 13 2015
Formula
a(n) = Sum_{i=1..floor(n/2)} (n-i)^i.
Comments