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-4 of 4 results.

A229895 k-tuple sizes in A229873.

Original entry on oeis.org

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

Views

Author

Carl R. White, Oct 03 2013

Keywords

Comments

Number k of elements to read from A229873 to obtain the next k-tuple.

Examples

			The sequence of tuples represented in A229873 begins (1), (2), (1,1), (1,2), (2,1), (2,2), (3), so this sequence begins 1, 1, 2, 2, 2, 2, 1.
		

Crossrefs

Programs

  • bc
    /* GNU bc */ for(n=1;n<=5;n++)for(k=1;k<=n;k++){if(k==n){t=n^n}else{t=n^k-(n-1)^k};for(i=1;i<=t;i++) print k,","};print "...\n"

A229874 An enumeration of all sorted k-tuples containing positive integers.

Original entry on oeis.org

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

Views

Author

Carl R. White, Oct 02 2013

Keywords

Comments

Begin with the 1-tuple (1), and then reading from the beginning of the list of k-tuples append to the list (n+1) if the k-tuple read is a 1-tuple and for all cases, append the (k+1)-tuples (...,n,1), (...,n,2), ..., (...,n,n), where n is the last element of the k-tuple that was read.
This sequence is a flattening of that process.
Each tuple contains a unique group of integers, meaning that the sequence of tuples is an enumeration of all finite sets of positive integers.
Determining a tuple's parent is as simple as removing the last element in the case of k-tuples where k>2 and by subtracting 1 from the only element in the case of 1-tuples. E.g., (7,5,3,2,1)'s ancestry is (7,5,3,2), (7,5,3), (7,5), (7), (6), (5), (4), (3), (2), (1).
Tuples are in ordered so that the rightmost element increases in value from sibling to sibling, resembling place-value notation. This has the side effect of putting the values within the tuples in the reverse of the usual sort order. The alternative version of this sequence with tuple values in increasing order can be found in A229897.
Remarkably, the k-tuple sizes can be found in A124736 - k repeated C(n,k-1) times - and relatedly, the first appearance of n in this sequence is at position 2^(n-1)+1.

Examples

			Sequence begins (1), (2), (1,1), (3), (2,1), (2,2), (1,1,1), (4), etc.
		

Crossrefs

Cf. A001057. All tuples, not just sorted: A229873. Alternative version: A229897.

A229897 Alternative version of A229874 with tuple values in increasing order.

Original entry on oeis.org

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

Views

Author

Carl R. White, Oct 04 2013

Keywords

Comments

An enumeration of all sorted k-tuples containing positive integers.
Begin with the 1-tuple (1), and then reading from the beginning of the list of k-tuples append to the list (n+1) if the k-tuple read is a 1-tuple and for all cases, append the (k+1)-tuples (1,n,...), (2,n,...), ..., (n,n,...), where n is the first element of the k-tuple that was read.
This sequence is a flattening of that process.
Other properties of this sequence are as A229874.

Examples

			Sequence begins (1), (2), (1,1), (3), (1,2), (2,2), (1,1,1), (4), etc.
		

Crossrefs

Cf. A001057. All tuples, not just sorted: A229873. Alternative version: A229874

A229896 Sizes of logical groups of the same integer in A229895.

Original entry on oeis.org

1, 1, 4, 1, 5, 27, 1, 7, 37, 256, 1, 9, 61, 369, 3125, 1, 11, 91, 671, 4651, 46656, 1, 13, 127, 1105, 9031, 70993, 823543, 1, 15, 169, 1695, 15961, 144495, 1273609, 16777216, 1, 17, 217, 2465, 26281, 269297, 2685817, 26269505, 387420489, 1, 19, 271, 3439
Offset: 1

Views

Author

Carl R. White, Oct 03 2013

Keywords

Comments

The two ones at the start of the parent sequence represent parent and child 1-tuples in the grandparent sequence [(1) and (2) respectively], hence this sequence also starts with 1, 1 rather than 2, which would otherwise be a more sensible way to describe the pair of ones.
All other elements are effectively run-lengths of strings of the same integer in A229895.
The first occurrence of an integer, n, in the parent sequence, is the first of a run of n^n elements of value n. For later occurrences, the run length is n^k-(n-1)^k where k is the size of the k-tuple in the grandparent sequence, A229873.
The elements can be arranged into a triangle thus:
.... 1
.... 1, 4
.... 1, 5, 27
.... 1, 7, 37, 256
.... 1, 9, 61, 369, 3125
.... etc.
where the n-th line is:
.... n^1-(n-1)^1, n^2-(n-1)^2, ..., n^(k-1)-(n-1)^(k-1), n^n; 1 <= k < n
The first terms, for sufficiently large n simplifying as:
.... 1, 2n-1, 3n^2-3n+1, 4n^3-6n^2+4n-1, etc.
Row sums are first differences of A031972, and thus the cumulative sum of rows at the end of each row is A031972 itself, i.e., n*(n^n - 1)/(n-1).

Crossrefs

Programs

  • Maple
    T := proc (n, k) if k < n then n^k-(n-1)^k elif k = n then n^n else end if end proc: for n to 12 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jan 30 2017
  • bc
    /* GNU bc */ for(n=1;n<=10;n++)for(p=1;p<=n;p++){if(p==n){t=n^n}else{t=n^p-(n-1)^p};print t,","};print "...\n"
Showing 1-4 of 4 results.