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.

A228099 Triangle read by rows, T(n, k) = prime(1)^p(k,1)*...*prime(n)^p(k,n) where p(k,j) is the j-th part of the k-th partition of n, additionally T(0,0) = 1. The partitions of n are ordered such that partitions of n into r parts appear in lexicographic order previous to the partitions of n into s parts if s < r. (Fenner-Loizou tree).

This page as a plain text file.
%I A228099 #27 Mar 06 2020 03:14:28
%S A228099 1,2,6,4,30,12,8,210,60,36,24,16,2310,420,180,120,72,48,32,30030,4620,
%T A228099 1260,840,900,360,240,216,144,96,64,510510,60060,13860,9240,6300,2520,
%U A228099 1680,1800,1080,720,480,432,288,192,128,9699690,1021020,180180,120120
%N A228099 Triangle read by rows, T(n, k) = prime(1)^p(k,1)*...*prime(n)^p(k,n) where p(k,j) is the j-th part of the k-th partition of n, additionally T(0,0) = 1. The partitions of n are ordered such that partitions of n into r parts appear in lexicographic order previous to the partitions of n into s parts if s < r. (Fenner-Loizou tree).
%C A228099 The partitions' representation (A228100) is a weakly decreasing list of parts.
%C A228099 The rows (read from left to right) are strongly decreasing. The T(n, 0) are the primorial numbers A002110(n). The right side of the triangle are the powers of 2,
%C A228099 T(n, A000041(n)) = A000079(n). The row sums are A074140.
%C A228099 The partition corresponding to a(n), n > 0, can be recovered as the exponents of the primes in the canonical prime factorization of a(n).
%D A228099 D. E. Knuth: The Art of Computer Programming. Generating all combinations and partitions, vol. 4, fasc. 3, 7.2.1.4, exercise 10.
%H A228099 Peter Luschny, <a href="/A228099/b228099.txt">Rows n = 0..25, flattened</a>
%H A228099 T. I. Fenner, G. Loizou, <a href="http://dx.doi.org/10.1093/comjnl/23.4.332">A binary tree representation and related algorithms for generating integer partitions</a>, The Computer J. 23(4), 332-337 (1980).
%H A228099 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/IntegerPartitionTrees">Integer Partition Trees</a>
%e A228099 The six-th row is:
%e A228099 [1, 1, 1, 1, 1, 1] -> 30030
%e A228099 [2, 1, 1, 1, 1] -> 4620
%e A228099 [2, 2, 1, 1] -> 1260
%e A228099 [3, 1, 1, 1] -> 840
%e A228099 [2, 2, 2] -> 900
%e A228099 [3, 2, 1] -> 360
%e A228099 [4, 1, 1] -> 240
%e A228099 [3, 3] -> 216
%e A228099 [4, 2] -> 144
%e A228099 [5, 1] -> 96
%e A228099 [6] -> 64
%p A228099 b:= proc(n, i) b(n, i):= `if`(n=0 or i=1, [[1$n]], [b(n, i-1)[],
%p A228099       `if`(i>n, [], map(x-> [i, x[]], b(n-i, i)))[]])
%p A228099     end:
%p A228099 T:= n-> map(h-> mul(ithprime(j)^h[j], j=1..nops(h)), sort(b(n$2),
%p A228099         proc(x, y) local i; if nops(x)<>nops(y) then return
%p A228099         nops(x)>nops(y) else for i to nops(x) do if x[i]<>y[i]
%p A228099         then return x[i]<y[i] fi od fi end))[]:
%p A228099 seq(T(n), n=0..8);  # _Alois P. Heinz_, Aug 13 2013
%t A228099 b[n_, i_] := If[n == 0 || i == 1, {Array[1&, n]}, Join[b[n, i-1], If[i>n, {}, Map[Function[x, Prepend[x, i]], b[n-i, i]]]]]; T[n_] := Map[Function[h, Times @@ ((Prime /@ Range[Length[h]])^h)], Sort[b[n, n], Which[Length[#1] > Length[#2], True, Length[#1] < Length[#2], False, True, OrderedQ[#1, #2]]&]]; Table[T[n], {n, 0, 8}] // Flatten (* _Jean-François Alcover_, Jan 27 2014, after Maple *)
%o A228099 (Sage)
%o A228099 from collections import deque
%o A228099 def Partitions_Fenner_Loizou(n):
%o A228099     p = ([], 0, n)
%o A228099     queue = deque()
%o A228099     queue.append(p)
%o A228099     yield p
%o A228099     while len(queue) > 0 :
%o A228099         (phead, pheadLen, pnum1s) = queue.popleft()
%o A228099         if pnum1s != 1 :
%o A228099             head = phead[:pheadLen] + [2]
%o A228099             q = (head, pheadLen + 1, pnum1s - 2)
%o A228099             if 1 <= q[2] : queue.append(q)
%o A228099             yield q
%o A228099         if pheadLen == 1 or (pheadLen > 1 and \
%o A228099                     (phead[pheadLen - 1] != phead[pheadLen - 2])) :
%o A228099             head = phead[:pheadLen]
%o A228099             head[pheadLen - 1] += 1
%o A228099             q = (head, pheadLen, pnum1s - 1)
%o A228099             if 1 <= q[2] : queue.append(q)
%o A228099             yield q
%o A228099 def A228099_row(n):
%o A228099     if n == 0: return [1]
%o A228099     L = []
%o A228099     P = primes_first_n(n)
%o A228099     for p in Partitions_Fenner_Loizou(n):
%o A228099         e = p[0] + [1 for i in range(p[2])]
%o A228099         c = mul(P[i]^e[i] for i in range(len(e)))
%o A228099         L.append(c)
%o A228099     return L
%o A228099 for n in (0..7): A228099_row(n)
%Y A228099 Cf. A228100.
%K A228099 nonn,tabf,look
%O A228099 0,2
%A A228099 _Peter Luschny_, Aug 10 2013