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.

A248147 Table read by rows: n-th row contains all consecutive subsets of the first n primes in their natural order.

This page as a plain text file.
%I A248147 #5 Oct 05 2014 09:28:40
%S A248147 2,2,3,2,3,2,3,5,2,3,3,5,2,3,5,2,3,5,7,2,3,3,5,5,7,2,3,5,3,5,7,2,3,5,
%T A248147 7,2,3,5,7,11,2,3,3,5,5,7,7,11,2,3,5,3,5,7,5,7,11,2,3,5,7,3,5,7,11,2,
%U A248147 3,5,7,11,2,3,5,7,11,13,2,3,3,5,5,7,7,11
%N A248147 Table read by rows: n-th row contains all consecutive subsets of the first n primes in their natural order.
%C A248147 A000292(n) = length of n-th row, whereas A000217(n) = number of all consecutive subsets of numbers 1..n;
%C A248147 T(n,k) = A000040(A248141(n,k)), 1 <= k <= A000292(n).
%H A248147 Reinhard Zumkeller, <a href="/A248147/b248147.txt">Rows n = 1..20 of triangle, flattened</a>
%e A248147 .  1: 2
%e A248147 .  2: 2,3,2,3
%e A248147 .  3: 2,3,5,2,3,3,5,2,3,5
%e A248147 .  4: 2,3,5,7,2,3,3,5,5,7,2,3,5,3,5,7,2,3,5,7
%e A248147 .  5: 2,3,5,7,11,2,3,3,5,5,7,7,11,2,3,5,3,5,7,5,7,11,2,3,5,7,3,5,7,11,...
%e A248147 rows concatenated from:
%e A248147 .  1: [2]
%e A248147 .  2: [2] [3] [2,3]
%e A248147 .  3: [2] [3] [5] [2,3] [3,5] [2,3,5]
%e A248147 .  4: [2] [3] [5] [7] [2,3] [3,5] [5,7] [2,3,5] [3,5,7] [2,3,5,7]
%e A248147 .  5: [2] [3] [5] [7] [11] [2,3] [3,5] [5,7] [7,11] [2,3,5] [3,5,7] ...
%o A248147 (Haskell)
%o A248147 import Data.List (group)
%o A248147 a248147 n k = a248147_tabf !! (n-1) !! (k-1)
%o A248147 a248147_row n = a248147_tabf !! (n-1)
%o A248147 a248147_tabf = map concat psss where
%o A248147    psss = iterate f [[2]] where
%o A248147       f pss = group (h $ last pss) ++ map h pss
%o A248147       h ws = ws ++ [a151800 $ last ws]
%Y A248147 Cf. A151800, A000292, A000217, A248164, A248141.
%K A248147 nonn,tabf
%O A248147 1,1
%A A248147 _Reinhard Zumkeller_, Oct 02 2014