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.

Showing 1-7 of 7 results.

A120695 Set partitions reversed interpreted as factorial base numbers.

Original entry on oeis.org

0, 1, 3, 5, 9, 15, 11, 17, 23, 33, 57, 39, 63, 87, 35, 59, 83, 41, 65, 89, 47, 71, 95, 119, 153, 273, 177, 297, 417, 159, 279, 399, 183, 303, 423, 207, 327, 447, 567, 155, 275, 395, 179, 299, 419, 203, 323, 443, 563, 161, 281, 401, 185, 305, 425, 209, 329, 449
Offset: 0

Views

Author

Keywords

Examples

			The third set partition is {1,2}, 21 in base factorial is 5, so a(3) = 5.
Triangle begins:
   0;
   1;
   3,  5;
   9, 15, 11, 17, 23;
  33, 57, 39, 63, 87, 35, 59, 83, 41, 65, 89, 47, 71, 95, 119;
		

Crossrefs

Cf. A000110 (row lengths), A120698, A120696 (sorted), A120697, A071155.
Column k=0 gives A007489.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, [0], [seq(map(
           x-> x+j*t!, b(n-1, max(m, j), t+1))[], j=1..m+1)])
        end:
    T:= n-> b(n, 0, 1)[]:
    seq(T(n), n=0..5);  # Alois P. Heinz, Apr 04 2016

A120696 Numbers whose factorial representation contains no zeros and each digit is at most one larger than the largest following digit.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 15, 17, 23, 33, 35, 39, 41, 47, 57, 59, 63, 65, 71, 83, 87, 89, 95, 119, 153, 155, 159, 161, 167, 177, 179, 183, 185, 191, 203, 207, 209, 215, 239, 273, 275, 279, 281, 287, 297, 299, 303, 305, 311, 323, 327, 329, 335, 359, 395, 399, 401, 407
Offset: 0

Views

Author

Keywords

Comments

0 is included by considering it to have the empty string as its factorial base representation.

Crossrefs

Cf. A000110 (row lengths), A120698, A120695, A120697, A071156.

A085693 Let f(0) = 1, f(1) = 12, f(2) = 223, f(3) = 3334, = f(4) = 44445, f(5) = 555556, etc. Sequence gives concatenation of 0, f(0), f(f(0)), f(f(f(0))), ...

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Aug 14 2003; revised Sep 18 2005

Keywords

Examples

			0;
1;
1, 2;
1, 2, 2, 2, 3;
1, 2, 2, 2, 3, 2, 2, 3, 2, 2, 3, 3, 3, 3, 4; ...
For large m, the m-th block is given by A085694.
		

Crossrefs

Cf. A085694, A000110, A048993 (the number of occurrences of k in n-th block).
Row maxima of A120698.

Extensions

Edited by Charles R Greathouse IV, Apr 30 2010

A376937 a(1)=1; thereafter a(n) is the smallest k for which the subsequence a(n-k..n-1) has a distinct rhyme scheme from that of any other subsequence of the sequence thus far.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Oct 11 2024

Keywords

Comments

In other words, a(n) is the length of the shortest subsequence ending at a(n-1) which has a unique rhyme scheme among all rhyme schemes of subsequences of the sequence thus far. Alternatively, this is (the length of the longest subsequence ending at a(n-1) whose rhyme scheme has occurred before as that of another subsequence) plus 1.
The rhyme scheme of a subsequence is found by assigning 1 to the first unique value, 2 to the second unique value, 3 to the third, and so on.

Examples

			a(6)=4 because the length-4 subsequence a(2..5) = 1,2,2,3 has the shortest unique rhyme scheme (1,2,2,3 or A,B,B,C,) which does not occur elsewhere as the rhyme scheme of any other subsequence in the sequence thus far. No shorter subsequence ending in a(5) with a unique rhyme scheme exists in the sequence thus far. For example, a(6) cannot be 3 because the length-3 subsequence a(3..5) = 2,2,3 has the same rhyme scheme (1,1,2 or A,A,B) as that of the subsequence a(1..3) = 1,1,2.
		

Crossrefs

Cf. A377079, A375207, A120698 (rhyme schemes), A000110.

Programs

  • Python
    from itertools import count, islice
    def rs(t): # rhyme scheme of t
        s, k, m  = [], 1, dict()
        for e in t:
            if e not in m: m[e] = k; k += 1
            s.append(m[e])
        return tuple(s)
    def agen(): # generator of terms
        a, R, maxL = [1], set(), 0  # maxL = max length of rhyme schemes stored
        for n in count(1):
            yield a[-1]
            for k in range(1, n+1):
                if k > maxL:  # must increase length of rhyme schemes stored
                    maxL += 1
                    R.update(rs(a[i:i+maxL]) for i in range(n-maxL))
                if rs(a[-k:]) not in R:
                    break
            an = k
            R.update(rs(a[-i:]) for i in range(1, maxL+1))
            a.append(an)
    print(list(islice(agen(), 90))) # Michael S. Branicky, Oct 13 2024

A120697 Set partitions interpreted as base m+1 numbers, where m is the size of the set.

Original entry on oeis.org

0, 1, 4, 5, 21, 22, 25, 26, 27, 156, 157, 161, 162, 163, 181, 182, 183, 186, 187, 188, 191, 192, 193, 194, 781, 782, 786, 787, 788, 806, 807, 808, 811, 812, 813, 816, 817, 818, 819, 906, 907, 908, 911, 912, 913, 916, 917, 918, 919, 931, 932, 933, 936, 937, 938
Offset: 0

Views

Author

Keywords

Examples

			Set partition number 3 is {1,2}, 12 in base 3 is 5, so a(3) = 5.
		

Crossrefs

Cf. A000110 (row lengths), A120698, A120695.

A120699 Lengths of set partitions.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Each n occurs Bell(n) times.

Crossrefs

Programs

  • Mathematica
    Flatten[Array[PadRight[{}, BellB[#], #]&, 7, 0]] (* Paolo Xausa, Feb 13 2024 *)

Formula

Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) + log(3)/2. - Amiram Eldar, Feb 18 2024

A193023 Triangle read by rows: the n-th row has length A000110(n) and contains all set partitions of an n-set in canonical order.

Original entry on oeis.org

1, 11, 12, 111, 112, 121, 122, 123, 1111, 1112, 1121, 1122, 1123, 1211, 1212, 1213, 1221, 1222, 1223, 1231, 1232, 1233, 1234, 11111, 11112, 11121, 11122, 11123, 11211, 11212, 11213, 11221, 11222, 11223, 11231, 11232, 11233, 11234, 12111, 12112, 12113, 12121
Offset: 1

Views

Author

N. J. A. Sloane, Jul 14 2011

Keywords

Comments

The set partition of [1,2,3,4] given by 13/2/4 would be encoded as 1213: simply record which part i is in, for i=1..n.
To get row n, read row n-1 from left to right. If row n-1 contains a word abc...d, in which the maximal number is m, then in row n we place the words abc...d1, abc...d2, abc...d3, ..., abc...d(m+1).
This provides a canonical ordering for partitions of a labeled set.

Examples

			Triangle begins:
  1;
  11,12;
  111,112,121,122,123;
  1111,1112,1121,1122,1123,1211,1212,1213,1221,1222,1223,1231,1232,1233,1234;
  11111,11112,11121,11122,11123,...
		

Crossrefs

This is different from A071159.

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n=1, [[1]], map(x-> seq([x[], i], i=1..max(x[])+1), b(n-1)))
        end:
    T:= n-> map(x-> parse(cat(x[])), b(n))[]:
    seq(T(n), n=1..5);  # Alois P. Heinz, Sep 30 2011
  • Mathematica
    b[n_] := b[n] = If[n == 1, {{1}}, Table[Append[#, i], {i, 1, Max[#]+1}]& /@ b[n-1] // Flatten[#, 1]&];
    T[n_] := FromDigits /@ b[n];
    Array[T, 8] // Flatten (* Jean-François Alcover, Feb 19 2021, after Alois P. Heinz *)
Showing 1-7 of 7 results.