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.

A228371 First differences of A228370. Also A001511 and A006519 interleaved.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 5, 16, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 6, 32, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 5, 16, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 7, 64
Offset: 1

Views

Author

Omar E. Pol, Aug 21 2013

Keywords

Comments

Number of toothpicks added at n-th stage to the toothpick structure (related to integer compositions) of A228370.
The equivalent sequence for integer partitions is A220517.

Examples

			Illustration of the structure after 32 stages. The diagram represents the 16 compositions of 5. The k-th horizontal line segment has length A001511(k) equals the largest part of the k-th region. The k-th vertical line segment has length A006519(k) equals the number of parts of the k-th region.
.      _ _ _ _ _
16     _        |
15     _|_      |
14     _  |     |
13     _|_|_    |
12     _    |   |
11     _|_  |   |
10     _  | |   |
9      _|_|_|_  |
8      _      | |
7      _|_    | |
6      _  |   | |
5      _|_|_  | |
4      _    | | |
3      _|_  | | |
2      _  | | | |
1       | | | | |
.
Written as an irregular triangle the sequence begins:
  1,1;
  2,2;
  1,1,3,4;
  1,1,2,2,1,1,4,8;
  1,1,2,2,1,1,3,4,1,1,2,2,1,1,5,16;
  1,1,2,2,1,1,3,4,1,1,2,2,1,1,4,8,1,1,2,2,1,1,3,4,1,1,2,2,1,1,6,32;
  ...
		

Crossrefs

Row lengths give 2*A011782. Right border gives A000079.

Programs

  • Python
    def A228371(n): return ((m:=(n>>1)+1)&-m).bit_length() if n&1 else (m:=n>>1)&-m # Chai Wah Wu, Jul 14 2022

Formula

a(2n-1) = A001511(n), n >= 1. a(2n) = A006519(n), n >= 1.