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.

Previous Showing 11-19 of 19 results.

A126441 Tabular arrangement of the natural numbers: the row on which any nonzero term a(n) appears in is A053645(a(n))=A053645(n+1), and the column is A161511(a(n)). Table is presented by columns with 2^{k-1} items in column k, unused positions are filled with 0's.

Original entry on oeis.org

1, 2, 3, 4, 5, 0, 7, 8, 9, 6, 11, 0, 0, 0, 15, 16, 17, 10, 19, 0, 13, 0, 23, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 18, 35, 12, 21, 14, 39, 0, 0, 0, 27, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 34, 67, 20, 37, 22, 71, 0, 25, 0, 43, 0, 29, 0, 79, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0
Offset: 0

Views

Author

Alford Arnold, Jan 19 2007

Keywords

Comments

Note: 1 might be a more natural starting offset for this sequence, although the identities concerning A053645 and A161511 would have to be changed. - Antti Karttunen, Oct 12 2009.
This can be regarded as an arrangement of the partitions, indexed by position in A125106. The partitions in a given row all have the same remaining partition when the largest part is removed; specifically, the partition indexed by the row number in A125106 (with row 0 having the empty partition remaining).
The first value on row n is A004760(n+1). The second value on each row is A004760(n+1) plus A062383(n); subsequent values increase by ever enlarging powers of two. Or equivalently, each subsequent value on the row after the first nonzero value is given by A004754(previous value on the same row).
A055941(r) tells how many terms the row r (>= 0) has been shifted rightward from its "natural position", i.e. with how many zeros that row has been prepended.
The number of (nonzero) entries in column k is A000041(k).

Examples

			The largest power of 2 <= 6 is 4, 6 - 4 = 2, so 6 is in row 2. By A125106, 6 corresponds to the partition [2^2], total 4, so 6 goes in column 4. Thus T(2,4) = 6.
The table begins:
1.2.4..8.16.32.64.128.256.512.1024
..3.5..9.17.33.65.129.257.513.1025
.......6.10.18.34..66.130.258..514
....7.11.19.35.67.131.259.515.1027
............12.20..36..68.132..260
.........13.21.37..69.133.261..517
............14.22..38..70.134..262
......15.23.39.71.135.263.519.1031
...................24..40..72..136
...............25..41..73.137..265
...................26..42..74..138
............27.43..75.139.267..523
.......................28..44...76
...............29..45..77.141..269
...................30..46..78..142
.........31.47.79.143.271.527.1039
...........................48...80
.......................49..81..145
...........................50...82
...................51..83.147..275
		

Crossrefs

Cf. A125106, A053645, A000041, A004760, A062383, A000079 (column lengths).
A053645(a(A166274(n))) = A053645(1+A166274(n)) for all n>=1.
Positions of zeros: A166275, this sequence without zeros: A161924. A161920(n) gives the position of the first nonzero term on the row n-1.

Programs

  • Mathematica
    columns = 7; row[n_] := n-2^Floor[Log2[n]]; col[0] = 0; col[n_] := If[EvenQ[n], col[n/2] + DigitCount[n/2, 2, 1], col[(n-1)/2]+1]; Clear[T]; T[, ] = 0; Do[T[row[k], col[k]] = k, {k, 1, 2^columns}]; Table[T[n-1, k], {k, 1, columns}, {n, 1, 2^(k-1)}] // Flatten (* Jean-François Alcover, Sep 09 2017 *)

Extensions

Edited by Franklin T. Adams-Watters, Jan 23 2007
Further edited and Scheme-code added by Antti Karttunen, Oct 12 2009

A161919 Permutation of natural numbers: concatenation of subsequences A161924(A000070(k-1)..A026905(k)), k >= 1, each sorted into ascending order.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 9, 11, 15, 10, 13, 16, 17, 19, 23, 31, 12, 14, 18, 21, 27, 32, 33, 35, 39, 47, 63, 20, 22, 25, 29, 34, 37, 43, 55, 64, 65, 67, 71, 79, 95, 127, 24, 26, 30, 36, 38, 41, 45, 51, 59, 66, 69, 75, 87, 111, 128, 129, 131, 135, 143, 159, 191, 255, 28, 40
Offset: 1

Views

Author

Alford Arnold, Jun 23 2009

Keywords

Comments

This is the lexicographically earliest sequence a_n for which it holds that A161511(a(n)) = A036042(n) for all n.
Triangle T(n,k) read by rows. Row n lists in increasing order the viabin numbers of the integer partitions of n (n >= 1, k >= 1). The viabin number of an integer partition is defined in the following way. Consider the southeast border of the Ferrers board of the integer partition and consider the binary number obtained by replacing each east step with 1 and each north step, except the last one, with 0. The corresponding decimal form is, by definition, the viabin number of the given integer partition. "Viabin" is coined from "via binary". For example, consider the integer partition [3,1,1] of 5. The southeast border of its Ferrers board yields 10011, leading to the viabin number 19 (an entry in the 5th row). - Emeric Deutsch, Sep 06 2017
After specifying the value of n, the first Maple program yields the entries of row n. - Emeric Deutsch, Feb 26 2016
After specifying the value of m, the third Maple program yields the first m rows; the command partovi(p) yields the viabin number of the partition p = [a,b,c,...]. - Emeric Deutsch, Aug 31 2017

Examples

			This can be viewed as an irregular table, where row r (>= 1) has A000041(r) elements, i.e., as 1; 2,3; 4,5,7; 6,8,9,11,15; 10,13,16,17,19,23,31; etc. A125106 illustrates how each number is mapped to a partition.
		

Crossrefs

Inverse: A166277. Sequence A161924 gives the same rows before sorting.

Programs

  • Maple
    n := 11: s := proc (b) local t, i, j: t := 0: for i to nops(b) do for j from i+1 to nops(b) do if b[j]-b[i] = 1 then t := t+1 else  end if end do end do: t end proc: A[n] := {}: for i to 2^n do a[i] := convert(2*i, base, 2) end do: for k to 2^n do if s(a[k]) = n then A[n] := `union`(A[n], {k}) else  end if end do: A[n]; # Emeric Deutsch, Feb 26 2016
    # second Maple program:
    f:= proc(l) local i, r; r:= 0; for i to nops(l)-1 do
           r:= 2*((x-> 2*x+1)@@(l[i+1]-l[i]))(r) od; r/2
        end:
    b:= proc(n, i) `if`(n=0 or i=1, [[0, 1$n]], [b(n, i-1)[],
          `if`(i>n, [], map(x-> [x[], i], b(n-i, i)))[]])
        end:
    T:= n-> sort(map(f, b(n$2)))[]:
    seq(T(n), n=1..10);  # Alois P. Heinz, Jul 25 2017
    # 3rd Maple program:
    m := 10; with(combinat): ff := proc (X) local s: s := [1, seq(0, j = 1 .. X[2])]: s := map(convert, s, string): return cat(op(s)) end proc: partovi := proc (P) local X, n, Y, i: X := convert(P, multiset): n := X[-1][1]: Y := map(proc (t) options operator, arrow: t[1] end proc, X): for i to n do if member(i, Y) = false then X := [op(X), [i, 0]] end if end do: X := sort(X, proc (s, t) options operator, arrow: evalb(s[1] < t[1]) end proc): X := map(ff, X): X := cat(op(X)): n := parse(X): n := convert(n, decimal, binary): (1/2)*n end proc: for n to m do {seq(partovi(partition(n)[q]), q = 1 .. numbpart(n))} end do; # Emeric Deutsch, Aug 31 2017
  • Mathematica
    columns = 10;
    row[n_] := n - 2^Floor[Log2[n]];
    col[0] = 0; col[n_] := If[EvenQ[n], col[n/2] + DigitCount[n/2, 2, 1], col[(n-1)/2] + 1];
    Clear[T]; T[, ] = 0; Do[T[row[k], col[k]] = k, {k, 1, 2^columns}];
    Table[DeleteCases[Sort @ Table[T[n-1, k], {n, 1, 2^(k-1)}], 0], {k, 1, columns}] // Flatten (* Jean-François Alcover, Feb 16 2021 *)

Extensions

Edited and extended by Antti Karttunen, Oct 12 2009

A167979 Linearize the arrays A099627 A124922 ... defined in A167204 and based on A161924 then concatenate to form a new table.

Original entry on oeis.org

1, 2, 6, 3, 10, 12, 4, 13, 20, 14, 5, 18, 25, 22, 24, 7, 21, 36, 29, 40, 26, 8, 27, 41, 38, 49, 42, 28, 9, 34, 51, 45, 72, 53, 44, 30, 11, 37, 68, 59, 81, 74, 57, 46, 48, 15, 43, 73, 70, 99, 85, 76, 61, 80, 50, 16, 55, 83, 77, 136, 107, 89, 78, 97, 82, 52
Offset: 1

Views

Author

Alford Arnold, Nov 15 2009

Keywords

Comments

Contribution from Alford Arnold, Nov 29 2009: (Start)
Note that the values within A167977 identify the number partitioned described in A125106 and A161924.
(End)

Examples

			The resulting table begins:
..1..2..3..4..5..7..8
..6.10.13.18.21.27
.12.20.25.36.41
.14.22.29.38
etc.
Contribution from _Alford Arnold_, Nov 29 2009: 4 equals 2+2 which maps to the natural number 6 (binary 110) and 6 appears in the second array (A124922).
		

Crossrefs

Contribution from Alford Arnold, Nov 29 2009: (Start)
A125106(Describes the mapping to partitions). A167977 is A161511(A167979).
(End)

Extensions

Corrected By Alford Arnold, Nov 29 2009

A240837 Partitions as specified by composition into an even number of parts.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 2, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 2, 2, 1, 4, 3, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, 4, 4, 3, 3, 1, 2, 2, 1, 1, 3, 3, 2, 5, 4, 1, 3, 1, 1, 4, 2, 2, 1, 1, 1, 3, 2, 2, 4, 3, 3, 2, 1
Offset: 2

Views

Author

Keywords

Comments

The composition specifies the run lengths of the boundary of the Ferrers diagram of the partition.
Taking the n-th row as multiple partitions, it consists of those partitions with the first hook size (largest part plus number of parts minus 1) equal to n-1. The number of integers in this n-th row is A001792(n-2), and the row sum is A049611(n-1).

Examples

			For row 11, the 11th row in A240750 is 2,1,1,1. This gives us the Ferrers diagram:
* * *
* *
with boundary 2 horizontal, 1 vertical, 1 horizontal, 1 vertical. This is the diagram for partition [2,2,1].
The table starts:
[]
(none)
1
1,1; 2
1,1,1; 2,2; 3; 2,1
1,1,1,1; 2,2,2; 3,3; 2,2,1; 4; 3,1; 2,1,1; 3,2
		

Crossrefs

Programs

  • PARI
    evil(n) = local(r=0, m=n); while(m>0, if(m%2==1, r=1-r); m\=2); n*2+r
    A066099row(n) = {local(v=vector(n), j=0, k=0);
       while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2);
       vector(j, i, v[j-i+1])}
    A240750row(n) = A066099row(evil(n))
    partpath(v) = {local(j=0,n=0,m=0,r);
       forstep(k=1,#v,2,n+=v[k];m+=v[k+1]);
       r=vector(n);
       forstep(k=1,#v,2,for(i=1,v[k],r[j++]=m);m-=v[k+1]);
       r}
    arow(n) = partpath(A240750row(n))

A241596 Partitions listed by alternately incrementing each part and appending a 1.

Original entry on oeis.org

1, 2, 11, 3, 22, 21, 111, 4, 33, 32, 222, 31, 221, 211, 1111, 5, 44, 43, 333, 42, 332, 322, 2222, 41, 331, 321, 2221, 311, 2211, 2111, 11111, 6, 55, 54, 444, 53, 443, 433, 3333, 52, 442, 432, 3332, 422, 3322, 3222, 22222, 51, 441, 431, 3331, 421, 3321, 3221, 22221, 411, 3311, 3211, 22211, 3111, 22111, 21111, 111111
Offset: 1

Views

Author

N. J. A. Sloane, May 19 2014

Keywords

Comments

Start with S_0 = {1}.
Thereafter, S_{n+1} consists of the partitions in S_n with all parts incremented by 1, together with all partitions in S_n with an additional part of 1.
From Franklin T. Adams-Watters, May 19 2014:
a(n) can be defined in terms of the binary expansion of n. Start with the partition [1]. Now process the bits of n from right to left, excluding the leading 1. For a zero bit, increase each number in the partition by 1; for a one bit, add a part of size 1. For example, for n=11, binary 1011, we get 1 -> 11 -> 111 -> 222 = a(11).
Row n consists of all partitions with hook size (maximum part + number of parts - 1) equal to n.
This sequence will eventually fail because digits greater than 9 are needed.

Examples

			The partitions appear in the following order:
S_0 = 1,
S_1 = 2, 11,
S_2 = 3, 22, 21, 111,
S_3 = 4, 33, 32, 222, 31, 221, 211, 1111,
S_4 = 5, 44, 43, 333, 42, 332, 322, 2222, 41, 331, 321, 2221, 311, 2211, 2111, 11111,
...
		

References

  • Arie Groeneveld, Posting to Sequence Fans List, May 19 2014

Crossrefs

See A242628 for another version of this list of partitions.
Cf. A125106, A240837, A112531, A241597 (compositions).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, [[1]],
          [map(x-> map(y-> y+1, x), b(n-1))[],
           map(x-> [x[], 1], b(n-1))[]])
        end:
    T:= n-> map(x-> parse(cat(x[])), b(n))[]:
    seq(T(n), n=1..6);

Extensions

Typos corrected by Alois P. Heinz, Sep 25 2015

A140760 Irregular table of natural numbers (read by columns) which can be mapped to the source partitions described in A053445 and A126441.

Original entry on oeis.org

2, 6, 12, 14, 24, 26, 30, 28, 48, 50, 54, 62, 52, 58, 96, 56, 60, 98, 102, 110, 126, 100, 106, 118, 192, 104, 108, 194, 114, 122, 198, 206, 222, 254, 112, 124, 116, 196, 202, 214, 238, 384, 120, 200, 204, 386, 210, 218, 390, 230, 246, 398, 414, 446, 510
Offset: 1

Views

Author

Alford Arnold, May 28 2008

Keywords

Comments

Sequences A000041, A002865 and A053445 count numeric partitions. A125106 maps numeric partitions to the natural numbers and has A000120 elements per row. A126441 has A000041 elements per column and is a tabular arrangement of the natural numbers. A140691 is a rearrangement of table A126441. A140692 extracts the cyclic cases and has A002865 elements per column.
The values for A140760 can also be generated by beginning with A140759 and repeatedly multiplying by two as follows:
2
....6.....12......24.....48.....96
..........14..........28........56
..................26........52....
..................30............60
.........................50.......
.........................54.......
.........................62.......
Note that the number of entries in each column is given by A053445.

Examples

			The values of A140760 can be obtained by selecting the first even number on each applicable row of Table A126441.
Table A126441 begins
1.2.4..8.16.32.64.128.256.512.1024
..3.5..9.17.33.65.129.257.513.1025
.......6.10.18.34..66.130.258..514
....7.11.19.35.67.131.259.515.1027
............12.20..36..68.132..260
.........13.21.37..69.133.261..517
............14.22..38..70.134..262
......15.23.39.71.135.263.519.1031
...................24..40..72..136
...............25..41..73.137..265
...................26..42..74..138
............27.43..75.139.267..523
.......................28..44...76
...............29..45..77.141..269
...................30..46..78..142
.........31.47.79.143.271.527.1039
...........................48...80
.......................49..81..145
...........................50...82
...................51..83.147..275
		

Crossrefs

A167977 Triangle A161511(A167979(n,k)).

Original entry on oeis.org

1, 2, 4, 2, 5, 6, 3, 5, 7, 6, 3, 6, 7, 7, 8, 3, 6, 8, 7, 9, 8, 4, 6, 8, 8, 9, 9, 9, 4, 7, 8, 8, 10, 9, 10, 8, 4, 7, 9, 8, 10, 10, 10, 9, 10
Offset: 1

Views

Author

Alford Arnold, Nov 24 2009

Keywords

Comments

Note that the values of this triangle identify the number partitioned described in A125105 and A161924.

Examples

			The triangle A167979 begins
1
2..6
3..10..12
so mapping each value with A161511 generates this triangle here, which begins
1
2..4
2..5..6
		

Crossrefs

A161923 Numbers n with property that each number corresponds to one of the partitions described in sequence A160643 and counted in A161921.

Original entry on oeis.org

28, 52, 58, 100, 106, 118, 112, 116, 124, 196, 202, 214, 238, 208, 212, 220, 226, 234, 250, 388, 394, 406, 430, 478, 232, 244, 400, 404, 412, 418, 426, 442, 454, 470, 502, 772, 778, 790, 814, 862, 958
Offset: 1

Views

Author

Alford Arnold, Jul 05 2009

Keywords

Examples

			The numbers form an irregular table with shape A161921 as follows:
28
52 58
100 106 118
112 116 124 196 202 214 238
208 212 220 226 234 250 388 394 406 430 478
		

Crossrefs

A125106 (Describes the mapping to partitions)

A173870 Consider each term k contained in A114994; write 2k if and only if 2k is not a member of A114994.

Original entry on oeis.org

6, 14, 20, 22, 30, 38, 46, 62, 70, 72, 78, 84, 86, 94, 126, 134, 142, 148, 150, 158, 174, 190, 254, 262, 270, 272, 276, 278, 286, 294, 302, 318, 340, 342, 350, 382, 510, 518, 526, 532, 534, 542, 550, 558, 574, 584, 590, 596, 598, 606, 638, 686, 702, 766, 1022
Offset: 0

Views

Author

Alford Arnold, Mar 01 2010

Keywords

Comments

Recall that A114994 can be regarded as a table with row lengths A000041(n).
Likewise, a(n) has row lengths 0,1,1,3,3,7,8,14,18,28,35,53,67,... which appears to coincide with sequence A117989.
The row lengths also match 1 2 3 5 7 11 15 22 ... minus 1 1 2 2 4 4 7 8 ... - Alford Arnold, Mar 30 2010

Examples

			Row three of A114994 is 4,5,7 when doubled becomes 8,10,14.
8 and 10 are in A114994 so not in a(n); 14 is not in A114994 so is in a(n).
		

Crossrefs

Cf. A000041 A114994 A117989 (A125106, A126441, A161924)(3 closely related sequences).
Cf. A002865 [From Alford Arnold, Mar 30 2010]
Previous Showing 11-19 of 19 results.