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.

A357618 a(n) = sum of lengths of partitions of more than one consecutive positive integer adding up to n.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 3, 2, 0, 5, 4, 2, 3, 2, 4, 10, 0, 2, 7, 2, 5, 11, 4, 2, 3, 7, 4, 11, 7, 2, 12, 2, 0, 11, 4, 14, 11, 2, 4, 11, 5, 2, 14, 2, 8, 25, 4, 2, 3, 9, 9, 11, 8, 2, 16, 17, 7, 11, 4, 2, 16, 2, 4, 27, 0, 17, 18, 2, 8, 11, 16
Offset: 0

Views

Author

Daniel Vik, Oct 06 2022

Keywords

Comments

A polite number (A138591) has at least one partition of two or more consecutive positive integers that equals n. This sequence is the sum of lengths of all partitions that make a number polite.
This sequence is similar to A204217 which sums lengths of all partitions adding up to n including the partition of length 1.

Examples

			n=15 is the sum of three partitions of n with two or more consecutive positive integers: 15 = 1 + 2 + 3 + 4 + 5, 15 = 4 + 5 + 6, 15 = 7 + 8.
The sum of the lengths of these partitions is a(15) = 5 + 3 + 2 = 10.
On the other hand a(8) = 0 because there are no partitions of two or more consecutive integers adding up to 8.
		

Crossrefs

Cf. A069283 (politeness of a number), A138591 (polite numbers).
Cf. A204217.

Programs

  • Python
    def A357618(n):
      i=2;r=0
      while n//i>0:r+=(n%i==1)*i;n-=i;i+=1
      return r
    A357618_list = [A357618(n) for n in range(70)]

Formula

a(n) = A204217(n) - 1 for n >= 1, a(0) = 0.