A074141
Sum of products of parts increased by 1 in all partitions of n.
Original entry on oeis.org
1, 2, 7, 18, 50, 118, 301, 684, 1621, 3620, 8193, 17846, 39359, 84198, 181313, 383208, 811546, 1695062, 3546634, 7341288, 15207022, 31261006, 64255264, 131317012, 268336125, 545858260, 1110092387, 2250057282, 4558875555, 9213251118, 18613373708, 37529713890
Offset: 0
The partitions of 4 are 4, 3+1, 2+2, 2+1+1, 1+1+1+1, the corresponding products when parts are increased by 1 are 5,8,9,12,16 and their sum is a(4) = 50.
-
b:= proc(n, i) option remember; `if`(n=0 or i=1,
2^n, b(n, i-1) +(1+i)*b(n-i, min(n-i, i)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..50); # Alois P. Heinz, Sep 07 2014
-
Table[Plus @@ Times @@@ (IntegerPartitions[n] + 1), {n, 0, 28}] (* T. D. Noe, Nov 01 2011 *)
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, (1+i) * b[n-i, i]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 08 2015, after Alois P. Heinz *)
-
S(n,m):=if n=0 then 1 else if nVladimir Kruchinin, Sep 07 2014 */
A074139
Number of divisors of A036035(n,k).
Original entry on oeis.org
1, 2, 3, 4, 4, 6, 8, 5, 8, 9, 12, 16, 6, 10, 12, 16, 18, 24, 32, 7, 12, 15, 16, 20, 24, 27, 32, 36, 48, 64, 8, 14, 18, 20, 24, 30, 32, 36, 40, 48, 54, 64, 72, 96, 128, 9, 16, 21, 24, 25, 28, 36, 40, 45, 48, 48, 60, 64, 72, 81, 80, 96, 108, 128, 144, 192, 256
Offset: 0
Express A036035(n,k) by its prime signature; add one to each exponent, then multiply: 180 = (2^2)*(3^2)*(5^1) therefore the number of divisors is (2+1)*(2+1)*(1+1)= 18
From _Michel Marcus_, Nov 11 2015: (Start)
As an irregular triangle, whose n-th row has A000041(n) terms, sequence begins:
1;
2;
3, 4;
4, 6, 8;
5, 8, 9, 12, 16;
6, 10, 12, 16, 18, 24, 32;
...
(End)
-
tabf(nn) = {for (n=1, nn, forpart(p=n, print1(prod(k=1, #p, (1+p[k])), ", ")); print(););} \\ Michel Marcus, Nov 11 2015
A087443
Least integer of each prime signature ordered first by sum of exponents and then by least integer value.
Original entry on oeis.org
1, 2, 4, 6, 8, 12, 30, 16, 24, 36, 60, 210, 32, 48, 72, 120, 180, 420, 2310, 64, 96, 144, 216, 240, 360, 840, 900, 1260, 4620, 30030, 128, 192, 288, 432, 480, 720, 1080, 1680, 1800, 2520, 6300, 9240, 13860, 60060, 510510, 256, 384, 576, 864, 960, 1296, 1440
Offset: 0
1;
2;
4,6;
8,12,30;
16,24,36,60,210;
32,48,72,120,180,420,2310;
64,96,144,216,240,360,840,900,1260,4620,30030;
128,192,288,432,480,720,1080,1680,1800,2520,6300,9240,13860,60060,510510;
-
b:= proc(n, i, l)
`if`(n=0, [mul(ithprime(t)^l[t], t=1..nops(l))],
`if`(i=1, b(0, 0, [l[], 1$n]), [b(n, i-1, l)[],
`if`(i>n, [], b(n-i, i, [l[], i]))[]]))
end:
T:= n-> sort(b(n$2, []))[]:
seq(T(n), n=0..10); # Alois P. Heinz, Jun 13 2012
-
b[n_, i_, l_] := b[n, i, l] = If[n == 0, Join[{Product[Prime[t]^l[[t]], {t, 1, Length[l]}]}], If[i == 1, b[0, 0, Join[l, Table[1, {n}]]], Join[b[n, i - 1, l], If[i > n, {}, b[n - i, i, Append[l, i]]]]]];
T[n_] := Sort[b[n, n, {}]];
Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 06 2017, after Alois P. Heinz *)
A343751
A(n,k) is the sum of all compositions [c_1, c_2, ..., c_k] of n into k nonnegative parts encoded as Product_{i=1..k} prime(i)^(c_i); square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 2, 0, 1, 5, 4, 0, 1, 10, 19, 8, 0, 1, 17, 69, 65, 16, 0, 1, 28, 188, 410, 211, 32, 0, 1, 41, 496, 1726, 2261, 665, 64, 0, 1, 58, 1029, 7182, 14343, 11970, 2059, 128, 0, 1, 77, 2015, 20559, 93345, 112371, 61909, 6305, 256, 0, 1, 100, 3478, 54814, 360612, 1139166, 848506, 315850, 19171, 512, 0
Offset: 0
A(1,3) = 10 = 5 + 3 + 2, sum of encoded compositions [0,0,1], [0,1,0], [1,0,0].
A(4,2) = 211 = 81 + 54 + 36 + 24 + 16, sum of encoded compositions [0,4], [1,3], [2,2], [3,1], [4,0].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
0, 2, 5, 10, 17, 28, 41, ...
0, 4, 19, 69, 188, 496, 1029, ...
0, 8, 65, 410, 1726, 7182, 20559, ...
0, 16, 211, 2261, 14343, 93345, 360612, ...
0, 32, 665, 11970, 112371, 1139166, 5827122, ...
0, 64, 2059, 61909, 848506, 13379332, 89131918, ...
-
A:= proc(n, k) option remember; `if`(n=0, 1,
`if`(k=0, 0, add(ithprime(k)^i*A(n-i, k-1), i=0..n)))
end:
seq(seq(A(n, d-n), n=0..d), d=0..10);
# second Maple program:
A:= proc(n, k) option remember; `if`(n=0, 1,
`if`(k=0, 0, ithprime(k)*A(n-1, k)+A(n, k-1)))
end:
seq(seq(A(n, d-n), n=0..d), d=0..10);
-
A[n_, k_] := A[n, k] = If[n == 0, 1,
If[k == 0, 0, Prime[k] A[n-1, k] + A[n, k-1]]];
Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Nov 06 2021, after 2nd Maple program *)
A325054
Sum of all compositions [c_1, c_2, ..., c_q] of n encoded as Product_{i=1..q} prime(i)^(c_i).
Original entry on oeis.org
1, 2, 10, 68, 640, 8372, 147820, 3321908, 90184300, 2857153892, 104146026820, 4363900557128, 209763325978480, 11462371025215112, 702793156696129600, 47649412958404240688, 3521160558576929028400, 280427910532671712997732, 23932837097476310995036900
Offset: 0
The compositions of 3 and their encodings are [1,1,1]-> 30, [1,2]-> 18, [2,1]-> 12, [3]-> 8. The sum gives a(3) = 68.
-
b:= proc(n, j) option remember; `if`(n=0, 1,
add(ithprime(j)^i*b(n-i, j+1), i=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..20); # Alois P. Heinz, Sep 04 2019
-
b[n_, j_] := b[n, j] = If[n==0, 1, Sum[Prime[j]^i*b[n-i, j+1], {i, 1, n}]];
a[n_] := b[n, 1];
a /@ Range[0, 20] (* Jean-François Alcover, Apr 23 2021, after Alois P. Heinz *)
A332626
Sum of least integers of prime signatures over all partitions of n into distinct parts.
Original entry on oeis.org
1, 2, 4, 20, 40, 152, 664, 1760, 5680, 24752, 138064, 356480, 1568320, 5886752, 32781664, 266420000, 726928960, 3135277952, 16299729664, 81402739520, 640678081600, 7084434124352, 18897678264064, 92846198695040, 464088929482240, 3347512310365952
Offset: 0
a(5) = 2^5 + 2^4*3^1 + 2^3*3^2 = 32 + 48 + 72 = 152.
-
b:= proc(n, i, j) option remember; `if`(i*(i+1)/2 b(n$2, 1):
seq(a(n), n=0..30);
-
b[n_, i_, j_] := b[n, i, j] = If[i(i+1)/2 < n, 0, If[n == 0, 1, b[n, i - 1, j] + Prime[j]^i b[n - i, Min[n - i, i - 1], j + 1]]];
a[n_] := b[n, n, 1];
a /@ Range[0, 30] (* Jean-François Alcover, May 04 2020, after Maple *)
A227955
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. The partitions of n are ordered in reversed lexicographic order read from left-to-right, starting with [1,1,...1] going down to [n].
Original entry on oeis.org
1, 2, 6, 4, 30, 12, 8, 210, 60, 36, 24, 16, 2310, 420, 180, 120, 72, 48, 32, 30030, 4620, 1260, 900, 840, 360, 216, 240, 144, 96, 64, 510510, 60060, 13860, 6300, 9240, 2520, 1800, 1080, 1680, 720, 432, 480, 288, 192, 128, 9699690, 1021020, 180180, 69300, 44100
Offset: 0
For instance the partitions of 4 are ordered [1,1,1,1], [2,1,1,0], [2,2,0,0], [3,1,0,0], [4,0,0,0]. Consider the partition P = (3,2,1,1) written as a Young diagram (in French notation):
[ ]
[ ]
[ ][ ]
[ ][ ][ ]
Next replace the boxes at the bottom line by the sequence of primes and write the number of boxes in the same column as exponents; then multiply. 2^4*3^2*5^1 = 720. 720 will appear in line 7 of the triangle (because P is a partition of 7) at position 10 (because the sequence of exponents [4, 2, 1] is the 10th partition in the order of partitions which we assume).
[0] 1,
[1] 2,
[2] 6, 4,
[3] 30, 12, 8,
[4] 210, 60, 36, 24, 16,
[5] 2310, 420, 180, 120, 72, 48, 32,
[6] 30030, 4620, 1260, 900, 840, 360, 216, 240, 144, 96, 64.
-
with(combinat):
A227955_row := proc(n) local e, w, p;
p := [seq(ithprime(i), i=1..n)];
w := e -> mul(p[i]^e[nops(e)-i+1], i=1..nops(e));
seq(w(e), e = partition(n)) end:
seq(print(A227955_row(i)), i=0..8);
-
def A227955_row(n):
L = []
P = primes_first_n(n)
for p in Partitions(n):
L.append(mul(P[i]^p[i] for i in range(len(p))))
return L[::-1]
for n in (0..8): A227955_row(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).
Original entry on oeis.org
1, 2, 6, 4, 30, 12, 8, 210, 60, 36, 24, 16, 2310, 420, 180, 120, 72, 48, 32, 30030, 4620, 1260, 840, 900, 360, 240, 216, 144, 96, 64, 510510, 60060, 13860, 9240, 6300, 2520, 1680, 1800, 1080, 720, 480, 432, 288, 192, 128, 9699690, 1021020, 180180, 120120
Offset: 0
The six-th row is:
[1, 1, 1, 1, 1, 1] -> 30030
[2, 1, 1, 1, 1] -> 4620
[2, 2, 1, 1] -> 1260
[3, 1, 1, 1] -> 840
[2, 2, 2] -> 900
[3, 2, 1] -> 360
[4, 1, 1] -> 240
[3, 3] -> 216
[4, 2] -> 144
[5, 1] -> 96
[6] -> 64
- D. E. Knuth: The Art of Computer Programming. Generating all combinations and partitions, vol. 4, fasc. 3, 7.2.1.4, exercise 10.
-
b:= proc(n, i) b(n, i):= `if`(n=0 or i=1, [[1$n]], [b(n, i-1)[],
`if`(i>n, [], map(x-> [i, x[]], b(n-i, i)))[]])
end:
T:= n-> map(h-> mul(ithprime(j)^h[j], j=1..nops(h)), sort(b(n$2),
proc(x, y) local i; if nops(x)<>nops(y) then return
nops(x)>nops(y) else for i to nops(x) do if x[i]<>y[i]
then return x[i]Alois P. Heinz, Aug 13 2013
-
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 *)
-
from collections import deque
def Partitions_Fenner_Loizou(n):
p = ([], 0, n)
queue = deque()
queue.append(p)
yield p
while len(queue) > 0 :
(phead, pheadLen, pnum1s) = queue.popleft()
if pnum1s != 1 :
head = phead[:pheadLen] + [2]
q = (head, pheadLen + 1, pnum1s - 2)
if 1 <= q[2] : queue.append(q)
yield q
if pheadLen == 1 or (pheadLen > 1 and \
(phead[pheadLen - 1] != phead[pheadLen - 2])) :
head = phead[:pheadLen]
head[pheadLen - 1] += 1
q = (head, pheadLen, pnum1s - 1)
if 1 <= q[2] : queue.append(q)
yield q
def A228099_row(n):
if n == 0: return [1]
L = []
P = primes_first_n(n)
for p in Partitions_Fenner_Loizou(n):
e = p[0] + [1 for i in range(p[2])]
c = mul(P[i]^e[i] for i in range(len(e)))
L.append(c)
return L
for n in (0..7): A228099_row(n)
Showing 1-8 of 8 results.
Comments