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.

A213059 Subsets of positive integers arranged in canonical order.

This page as a plain text file.
%I A213059 #14 Jan 12 2021 09:08:10
%S A213059 1,12,2,123,13,23,3,1234,124,134,234,14,24,34,4,12345,1235,1245,1345,
%T A213059 2345,125,135,145,235,245,345,15,25,35,45,5,123456,12346,12356,12456,
%U A213059 13456,23456,1236,1246,1256,1346,1356,1456,2346,2356,2456,3456,126,136,146,156,236,246,256,346,356,456,16,26,36,46,56,6
%N A213059 Subsets of positive integers arranged in canonical order.
%C A213059 The order is self-explanatory (or see the Kubo-Vakil paper).
%C A213059 Of course once we reach subsets containing 10 this way of representing subsets by concatenation is unsatisfactory. Still, the sequence serves as a pointer to the Kubo-Vakil paper.
%C A213059 Sort by largest element, then decreasing size, then lexicographically (see Kubo-Vakil paper). - _Michael S. Branicky_, Jan 12 2021
%H A213059 Michael S. Branicky, <a href="/A213059/b213059.txt">Table of n, a(n) for n = 1..10000</a>
%H A213059 T. Kubo and R. Vakil, <a href="http://dx.doi.org/10.1016/0012-365X(94)00303-Z">On Conway's recursive sequence</a>, Discr. Math. 152 (1996), 225-252. a(n) is the concatenation of their S(n).
%o A213059 (Python)
%o A213059 from itertools import chain, combinations as C
%o A213059 def powerset(s): # in decreasing size
%o A213059   return chain.from_iterable(C(s, r) for r in range(len(s), -1, -1))
%o A213059 def agen():
%o A213059   m = 1 # largest element
%o A213059   while True:
%o A213059     for p in powerset(range(1, m)): yield int("".join(map(str, p+(m,))))
%o A213059     m += 1
%o A213059 def aupton(terms):
%o A213059   alst, g = [], agen()
%o A213059   while len(alst) < terms: alst += [next(g)]
%o A213059   return alst
%o A213059 print(aupton(63)) # _Michael S. Branicky_, Jan 12 2021
%Y A213059 Cf. A030299.
%K A213059 nonn
%O A213059 1,2
%A A213059 _N. J. A. Sloane_, Jun 03 2012
%E A213059 a(25) corrected by _Michael S. Branicky_, Jan 12 2021