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.

A048794 Subsets of natural numbers arranged in standard statistical (or Yates) order.

This page as a plain text file.
%I A048794 #28 Nov 29 2023 11:02:36
%S A048794 0,1,2,12,3,13,23,123,4,14,24,124,34,134,234,1234,5,15,25,125,35,135,
%T A048794 235,1235,45,145,245,1245,345,1345,2345,12345,6,16,26,126,36,136,236,
%U A048794 1236,46,146,246,1246,346,1346,2346,12346,56,156,256,1256,356,1356
%N A048794 Subsets of natural numbers arranged in standard statistical (or Yates) order.
%C A048794 a(2^n) = n+1. - _Reinhard Zumkeller_, Nov 16 2013
%D A048794 S. Hedayat, N. J. A. Sloane and J. Stufken, Orthogonal Arrays, Springer-Verlag, NY, 1999, p. 249.
%H A048794 Reinhard Zumkeller, <a href="/A048794/b048794.txt">Table of n, a(n) for n = 0..10000</a>
%F A048794 Constructed recursively: subsets that include n are obtained by appending n to all earlier subsets.
%F A048794 From _Alois P. Heinz_, Feb 02 2023: (Start)
%F A048794 a(floor(2^(n-1))) = a(A131577(n)) = n.
%F A048794 a(2^n-1) = a(A000225(n)) = A007908(n) for n>=1. (End)
%e A048794 empty; 1; 2; 1 2; 3; 1 3; 2 3; 1 2 3;...
%p A048794 a:= n-> (l-> parse(cat(0, seq(`if`(l[i]=1, i, [][])
%p A048794              , i=1..nops(l)))))(Bits[Split](n)):
%p A048794 seq(a(n), n=0..53);  # _Alois P. Heinz_, Feb 01 2023
%t A048794 nmax = 6; s[0] = {{}}; s[n_] := s[n] = Join[s[n-1], Append[#, n]& /@ s[n-1]]; FromDigits /@ s[nmax] (* _Jean-François Alcover_, Nov 15 2011 *)
%o A048794 (C) #include <stdio.h>
%o A048794 #include <stdlib.h>
%o A048794 #define USAGE "Usage: 'A048794 num' where num is the largest number to use creating sets.\n"
%o A048794 #define MAX_NUM 10
%o A048794 #define MAX_ROW 1024
%o A048794 int main(int argc, char *argv[]) { unsigned char a[MAX_ROW][MAX_NUM]; signed short old_row, new_row, i, j, end; if (argc < 2) { fprintf(stderr, USAGE); return EXIT_FAILURE; } end = atoi(argv[1]); end = (end > MAX_NUM) ? MAX_NUM: end; for (i = 0; i < MAX_ROW; i++) for ( j = 0; j < MAX_NUM; j++) a[i][j] = 0; a[1][0] = '1'; new_row = 2; for (i = 2; i <= end; i++) { sprintf(&a[new_row++ ][0], "%d", i); for (old_row = 1; a[old_row][0] != (i+48); old_row++) { sprintf(&a[new_row++ ][0], "%s%d", &a[old_row][0], i); } } fprintf(stdout, "Values: 0"); for (i = 1; a[i][0] != 0; i++) fprintf(stdout, ",%s", &a[i][0]); fprintf(stdout, "\n"); return EXIT_SUCCESS; }
%o A048794 (Haskell)
%o A048794 a048794 n = a048794_list !! n
%o A048794 a048794_list = map (read . concatMap show) a048793_tabf :: [Integer]
%o A048794 -- _Reinhard Zumkeller_, Nov 16 2013
%Y A048794 Cf. A000027, A000225, A007908, A048793, A131577.
%K A048794 nonn,easy,nice,base
%O A048794 0,3
%A A048794 _N. J. A. Sloane_
%E A048794 More terms from Larry Reeves (larryr(AT)acm.org), Apr 11 2000
%E A048794 Keyword base added by _Reinhard Zumkeller_, Nov 16 2013