cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226140 a(n) = Sum_{i=1..floor(n/2)} (n-i)^i.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, May 27 2013

Keywords

Comments

a(n) is the sum of the larger parts raised to the corresponding smaller parts of the partitions of n into exactly two parts.

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.
		

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.