A238966
The number of distinct primes in divisor lattice in canonical order.
Original entry on oeis.org
0, 1, 1, 2, 1, 2, 3, 1, 2, 2, 3, 4, 1, 2, 2, 3, 3, 4, 5, 1, 2, 2, 3, 2, 3, 4, 3, 4, 5, 6, 1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 5, 4, 5, 6, 7, 1, 2, 2, 3, 2, 3, 4, 2, 3, 3, 4, 5, 3, 4, 4, 5, 6, 4, 5, 6, 7, 8, 1, 2, 2, 3, 2, 3, 4, 2, 3, 3, 4, 5, 3, 3, 4, 4, 5, 6, 3, 4, 5, 4, 5, 6, 7, 5, 6, 7, 8, 9
Offset: 0
Triangle T(n,k) begins:
0;
1;
1, 2;
1, 2, 3;
1, 2, 2, 3, 4;
1, 2, 2, 3, 3, 4, 5;
1, 2, 2, 3, 2, 3, 4, 3, 4, 5, 6;
...
The generalization to compositions is
A000120.
The sum of the partition is
A036042.
The lexicographic version (sum/lex) is
A049085.
The partition has
A115623 distinct elements.
The Heinz number of the partition is
A129129.
The colexicographic version (sum/colex) is
A193173.
The maximum of the partition is
A331581.
Partitions in lexicographic order (sum/lex) are
A193073.
Partitions in colexicographic order (sum/colex) are
A211992.
Cf.
A026792,
A036036,
A080576,
A103921,
A112798,
A182715,
A333486,
A334302,
A334435,
A334436,
A334442.
-
o:= proc(n) option remember; nops(ifactors(n)[2]) end:
b:= (n, i)-> `if`(n=0 or i=1, [[1$n]], [map(x->
[i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
T:= n-> map(x-> o(mul(ithprime(i)^x[i], i=1..nops(x))), b(n$2))[]:
seq(T(n), n=0..9); # Alois P. Heinz, Mar 26 2020
-
revlexsort[f_,c_]:=OrderedQ[PadRight[{c,f}]];
Table[Length/@Sort[IntegerPartitions[n],revlexsort],{n,0,8}] (* Gus Wiseman, May 24 2020 *)
b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {Table[1, {n}]}, Join[ Prepend[#, i]& /@ b[n - i, Min[n - i, i]], b[n, i - 1]]];
P[n_] := P[n] = Product[Prime[i]^#[[i]], {i, 1, Length[#]}]& /@ b[n, n];
T[n_, k_] := PrimeNu[P[n][[k + 1]]];
Table[T[n, k], {n, 0, 9}, {k, 0, Length[P[n]] - 1}] // Flatten (* Jean-François Alcover, Jan 03 2022, after Alois P. Heinz in A063008 *)
-
Row(n)={apply(s->#s, vecsort([Vecrev(p) | p<-partitions(n)], , 4))}
{ for(n=0, 8, print(Row(n))) } \\ Andrew Howroyd, Mar 25 2020
Offset changed and terms a(50) and beyond from
Andrew Howroyd, Mar 25 2020
A322827
A permutation of A025487: Sequence of least representatives of distinct prime signatures obtained from the run lengths present in the binary expansion of n.
Original entry on oeis.org
1, 2, 6, 4, 36, 30, 12, 8, 216, 180, 210, 900, 72, 60, 24, 16, 1296, 1080, 1260, 5400, 44100, 2310, 6300, 27000, 432, 360, 420, 1800, 144, 120, 48, 32, 7776, 6480, 7560, 32400, 264600, 13860, 37800, 162000, 9261000, 485100, 30030, 5336100, 1323000, 69300, 189000, 810000, 2592, 2160, 2520, 10800, 88200, 4620, 12600
Offset: 0
The sequence can be represented as a binary tree:
1
|
...................2...................
6 4
36......../ \........30 12......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
216 180 210 900 72 60 24 16
etc.
Both children are multiples of their common parent, see A323503, A323504 and A323507.
The value of a(n) is computed from the binary expansion of n as follows: Starting from the least significant end of the binary expansion of n (A007088), we record the successive run lengths, subtract one from all lengths except the first one, and use the reversed partial sums of these adjusted values as the exponents of successive primes.
For 11, which is "1011" in base 2, we have run lengths [2, 1, 1] when scanned from the right, and when one is subtracted from all except the first, we have [2, 0, 0], partial sums of which is [2, 2, 2], which stays same when reversed, thus a(11) = 2^2 * 3^2 * 5^2 = 900.
For 13, which is "1101" in base 2, we have run lengths [1, 1, 2] when scanned from the right, and when one is subtracted from all except the first, we have [1, 0, 1], partial sums of which is [1, 1, 2], reversed [2, 1, 1], thus a(13) = 2^2 * 3^1 * 5^1 = 60.
Sequence A227183 is based on the same algorithm.
Cf.
A000079 (right edge),
A000400 (left edge, apart from 2),
A005811,
A046523,
A101296,
A227183,
A322585,
A322825,
A323503,
A323504,
A323507.
-
{1}~Join~Array[Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ Accumulate@ MapIndexed[Length[#1] - Boole[First@ #2 > 1] &, Split@ Reverse@ IntegerDigits[#, 2]]] &, 54] (* Michael De Vlieger, Feb 05 2020 *)
-
A322827(n) = if(!n,1,my(bits = Vecrev(binary(n)), rl=1, o = List([])); for(i=2,#bits,if(bits[i]==bits[i-1], rl++, listput(o,rl))); listput(o,rl); my(es=Vecrev(Vec(o)), m=1); for(i=1,#es,m *= prime(i)^es[i]); (m));
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 *)
A331581
Maximum part of the n-th integer partition in graded reverse-lexicographic order (A080577); a(1) = 0.
Original entry on oeis.org
0, 1, 2, 1, 3, 2, 1, 4, 3, 2, 2, 1, 5, 4, 3, 3, 2, 2, 1, 6, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 1, 8, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 9, 8, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1
Offset: 1
The sequence of all partitions in graded reverse-lexicographic order begins as follows. The terms are the initial parts.
() (3,2) (2,1,1,1,1) (2,2,1,1,1)
(1) (3,1,1) (1,1,1,1,1,1) (2,1,1,1,1,1)
(2) (2,2,1) (7) (1,1,1,1,1,1,1)
(1,1) (2,1,1,1) (6,1) (8)
(3) (1,1,1,1,1) (5,2) (7,1)
(2,1) (6) (5,1,1) (6,2)
(1,1,1) (5,1) (4,3) (6,1,1)
(4) (4,2) (4,2,1) (5,3)
(3,1) (4,1,1) (4,1,1,1) (5,2,1)
(2,2) (3,3) (3,3,1) (5,1,1,1)
(2,1,1) (3,2,1) (3,2,2) (4,4)
(1,1,1,1) (3,1,1,1) (3,2,1,1) (4,3,1)
(5) (2,2,2) (3,1,1,1,1) (4,2,2)
(4,1) (2,2,1,1) (2,2,2,1) (4,2,1,1)
Triangle begins:
0
1
2 1
3 2 1
4 3 2 2 1
5 4 3 3 2 2 1
6 5 4 4 3 3 3 2 2 2 1
7 6 5 5 4 4 4 3 3 3 3 2 2 2 1
8 7 6 6 5 5 5 4 4 4 4 4 3 3 3 3 3 2 2 2 2 1
Lexicographically ordered reversed partitions are
A026791.
Reverse-colexicographically ordered partitions are
A026792.
Reversed partitions in Abramowitz-Stegun order (sum/length/lex) are
A036036.
Reverse-lexicographically ordered partitions are
A080577.
Distinct parts of these partitions are counted by
A115623.
Lexicographically ordered partitions are
A193073.
Colexicographically ordered partitions are
A211992.
Lengths of these partitions are
A238966.
Cf.
A036037,
A048793,
A063008,
A066099,
A129129,
A185974,
A228100,
A228531,
A334301,
A334434,
A334436,
A334438.
-
revlexsort[f_,c_]:=OrderedQ[PadRight[{c,f}]];
Prepend[First/@Join@@Table[Sort[IntegerPartitions[n],revlexsort],{n,8}],0]
A074140
Sum of least integers of prime signatures over all partitions of n.
Original entry on oeis.org
1, 2, 10, 50, 346, 3182, 38770, 609290, 11226106, 250148582, 7057182250, 216512001950, 7903965900226, 321552174623162, 13779150603234010, 644574260638821590, 33968684108427733426, 1994885097404292104942, 121496572792097514728530, 8114030083731371137603190
Offset: 0
a(6) = 64+96+144+216+240+360+900+840+1260+4620+30030 = 38770.
-
b:= proc(n, i, j) option remember;
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1, j)+
`if`(i>n, 0, ithprime(j)^i*b(n-i, i, j+1))))
end:
a:= n-> b(n$2, 1):
seq(a(n), n=0..40); # Alois P. Heinz, Aug 03 2013
-
b[n_, i_, j_] := b[n, i, j] = If[n == 0, 1, If[i<1, 0, b[n, i-1, j]+If[i>n, 0, Prime[j]^i*b[n-i, i, j+1]]]]; a[n_] := b[n, n, 1]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 25 2014, after Alois P. Heinz *)
-
def A074140(n):
L = []
P = primes_first_n(n)
for p in Partitions(n):
m = mul(P[i]^pi for i, pi in enumerate(p))
L.append(m)
return add(L)
[A074140(n) for n in (0..20)] # Peter Luschny, Aug 02 2013
a(10)-a(12) from Thomas A. Rockwell (LlewkcoRAT(AT)aol.com), Sep 30 2004
A194546
Triangle read by rows: T(n,k) is the largest part of the k-th partition of n, with partitions in colexicographic order.
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 1, 2, 3, 2, 4, 1, 2, 3, 2, 4, 3, 5, 1, 2, 3, 2, 4, 3, 5, 2, 4, 3, 6, 1, 2, 3, 2, 4, 3, 5, 2, 4, 3, 6, 3, 5, 4, 7, 1, 2, 3, 2, 4, 3, 5, 2, 4, 3, 6, 3, 5, 4, 7, 2, 4, 3, 6, 5, 4, 8, 1, 2, 3, 2, 4, 3, 5, 2, 4, 3, 6, 3, 5, 4, 7, 2, 4, 3, 6, 5, 4, 8, 3, 5, 4, 7, 3, 6, 5, 9
Offset: 1
For n = 5 the partitions of 5 in colexicographic order are:
1+1+1+1+1
2+1+1+1
3+1+1
2+2+1
4+1
3+2
5
so the fifth row is the largest in each partition: 1,2,3,2,4,3,5
Triangle begins:
1;
1,2;
1,2,3;
1,2,3,2,4;
1,2,3,2,4,3,5;
1,2,3,2,4,3,5,2,4,3,6;
1,2,3,2,4,3,5,2,4,3,6,3,5,4,7;
1,2,3,2,4,3,5,2,4,3,6,3,5,4,7,2,4,3,6,5,4,8;
...
Let y be the n-th integer partition in colexicographic order (
A211992):
- The maximum of y is a(n).
- The Heinz number of y is
A334437(n).
Lexicographically ordered reversed partitions are
A026791.
Reverse-colexicographically ordered partitions are
A026792.
Reversed partitions in Abramowitz-Stegun order (sum/length/lex) are
A036036.
Reverse-lexicographically ordered partitions are
A080577.
Lexicographically ordered partitions are
A193073.
-
colex[f_,c_]:=OrderedQ[PadRight[{Reverse[f],Reverse[c]}]];
Max/@Join@@Table[Sort[IntegerPartitions[n],colex],{n,8}] (* Gus Wiseman, May 31 2020 *)
A330661
T(n,k) is the index within the partitions of n in canonical ordering of the k-th partition whose parts differ pairwise by at most one.
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 1, 3, 4, 5, 1, 3, 5, 6, 7, 1, 5, 8, 9, 10, 11, 1, 5, 9, 12, 13, 14, 15, 1, 8, 13, 18, 19, 20, 21, 22, 1, 8, 19, 22, 26, 27, 28, 29, 30, 1, 13, 22, 30, 37, 38, 39, 40, 41, 42, 1, 13, 30, 41, 46, 51, 52, 53, 54, 55, 56, 1, 20, 44, 59, 62, 71, 72, 73, 74, 75, 76, 77
Offset: 1
Partitions of 8 in canonical ordering begin: 8, 71, 62, 611, 53, 521, 5111, 44, 431, 422, 4211, 41111, 332, ... . The partitions whose parts differ pairwise by at most one in this list are 8, 44, 332, ... at indices 1, 8, 13, ... and this gives row 8 of this triangle.
Triangle T(n,k) begins:
1;
1, 2;
1, 2, 3;
1, 3, 4, 5;
1, 3, 5, 6, 7;
1, 5, 8, 9, 10, 11;
1, 5, 9, 12, 13, 14, 15;
1, 8, 13, 18, 19, 20, 21, 22;
1, 8, 19, 22, 26, 27, 28, 29, 30;
1, 13, 22, 30, 37, 38, 39, 40, 41, 42;
...
-
b:= proc(l) option remember; (n-> `if`(n=0, 1,
b(subsop(1=[][], l))+g(n, l[1]-1)))(add(j, j=l))
end:
g:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
`if`(i<1, 0, g(n-i, min(n-i, i))+g(n, i-1)))
end:
T:= proc(n, k) option remember; 1 + g(n$2)-
b((q-> [q+1$r, q$k-r])(iquo(n, k, 'r')))
end:
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Feb 19 2020
-
b[l_List] := b[l] = Function[n, If[n == 0, 1, b[ReplacePart[l, 1 -> Nothing]] + g[n, l[[1]] - 1]]][Total[l]];
g[n_, i_] := g[n, i] = If[n == 0 || i == 1, 1, If[i < 1, 0, g[n - i, Min[n - i, i]] + g[n, i - 1]]];
T[n_, k_] := T[n, k] = Module[{q, r}, {q, r} = QuotientRemainder[n, k]; 1 + g[n, n] - b[Join[Table[q + 1, {r}], Table[q, {k - r}]]]];
Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 29 2020, after Alois P. Heinz *)
-
balP(p) = p[1]-p[#p]<=1
Row(n)={v=vecsort([Vecrev(p) | p<-partitions(n)], , 4);select(i->balP(v[i]),[1..#v])}
{ for(n=1, 10, print(Row(n))) }
A328773
Irregular triangle read by rows: T(n,k) is the number of colored digraphs on n nodes with color scheme given by the partitions of n in canonical ordering.
Original entry on oeis.org
1, 1, 3, 4, 16, 36, 64, 218, 752, 1104, 2112, 4096, 9608, 45960, 90416, 178944, 266496, 528384, 1048576, 1540944, 9133760, 22692704, 45277312, 30194176, 90196736, 180011008, 135032832, 269500416, 537919488, 1073741824
Offset: 0
The sequence begins:
1;
1;
3, 4;
16, 36, 64;
218, 752, 1104, 2112, 4096;
9608, 45960, 90416, 178944, 266496, 528384, 1048576;
...
For n = 3, the three partitions of n are [3], [2, 1] and [1, 1, 1]. T(n,1) = 16 gives the number of colored digraphs with all nodes having the same color; T(n, 2) = 36 gives the number of colored digraphs with two nodes having the first color and one node having the second color; T(n, 3) gives the number of colored digraphs with each node having its own color.
For n = 5, k = 4 the required partition is [3,1,1]. T(5,4) = 178944 is then the number of colored digraphs with 5 nodes, where 3 nodes have the first color and the other two nodes each has its own color.
- N. G. de Bruijn, Pólyas Abzähl-Theorie: Muster für Graphen und chemische Verbindungen, Selecta Mathematica III, Springer-Verlag (1971), 1-55.
Cf.
A000041 equals the row length,
A080577 lists the partitions in the used order,
A063008 instantiates the index sequences encoding the partitions.
A000273 and
A053763 represent the flanks of the triangle.
-
\\ here C(p) computes sequence value for given partition.
permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i]-1)}
C(p)={((i,v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v,Vec(q)))); s/p[i]!))(1, [])}
Row(n)={apply(C, vecsort([Vecrev(p) | p<-partitions(n)], ,4))}
{ for(n=0, 6, print(Row(n))) } \\ Andrew Howroyd, Nov 02 2019
A062515
Leading least prime signatures, ordered by forming the product of primorials greater than 2 with multiplicities given by the canonical sequence of partitions.
Original entry on oeis.org
1, 6, 30, 36, 210, 180, 216, 2310, 1260, 900, 1080, 1296, 30030, 13860, 6300, 7560, 5400, 6480, 7776, 510510, 180180, 69300, 83160, 44100, 37800, 45360, 27000, 32400, 38880, 46656, 9699690, 3063060, 900900, 1081080, 485100, 415800, 498960, 264600, 189000
Offset: 0
Values in A025487 can be generated via powers of two as follows:
1
2
4,6
8,12
16,24,30
32,48,60,36
64,96,120,72
128,192,240,144,210,180,216
a(3) = 36 because we can write [1,1] and associate this exponent vector with 6*6
-
import Data.List(inits)
primes :: [Integer]
primes = 2 : 3 : filter (\a -> all (not . divides a) (takeWhile (\x -> x <= a `div` 2) primes)) [4..]
where
divides a b = a `mod` b == 0
primorials :: [Integer]
primorials = map product $ inits primes
partitions :: [[Integer]]
partitions = concat $ map (partitions_of_n) [0..]
partitions_of_n :: Integer -> [[Integer]]
partitions_of_n n = partitions_at_most n n
partitions_at_most :: Integer -> Integer -> [[Integer]]
partitions_at_most _ 0 = [[]]
partitions_at_most 0 _ = []
partitions_at_most m n = concat $ map (\k -> map ([k] ++) (partitions_at_most k (n-k))) ( reverse [1..(min m n)])
a062515 :: [Integer]
a062515 = map primorial_signature partitions
where
primorial_signature p = product $ map ((drop 1 primorials) !!) (map fromIntegral p)
-- Jack W Grahl, Jul 06 2018
A238964
Size of divisor lattice in canonical order.
Original entry on oeis.org
0, 1, 2, 4, 3, 7, 12, 4, 10, 12, 20, 32, 5, 13, 17, 28, 33, 52, 80, 6, 16, 22, 36, 24, 46, 72, 54, 84, 128, 192, 7, 19, 27, 44, 31, 59, 92, 64, 75, 116, 176, 135, 204, 304, 448, 8, 22, 32, 52, 38, 72, 112, 40, 82, 96, 148, 224, 104, 160, 186, 280, 416, 216, 324, 480, 704, 1024
Offset: 0
Triangle T(n,k) begins:
0;
1;
2, 4;
3, 7, 12;
4, 10, 12, 20, 32;
5, 13, 17, 28, 33, 52, 80;
6, 16, 22, 36, 24, 46, 72, 54, 84, 128, 192;
...
-
with(numtheory):
b:= (n, i)-> `if`(n=0 or i=1, [[1$n]], [map(x->
[i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
T:= n-> map(x-> (p-> add(nops(factorset(d)), d=divisors
(p)))(mul(ithprime(i)^x[i], i=1..nops(x))), b(n$2))[]:
seq(T(n), n=0..9); # Alois P. Heinz, Mar 24 2020
-
A062799[n_] := PrimeNu[Divisors[n]] // Total;
b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {Table[1, {n}]}, Join[Prepend[#, i]& /@ b[n - i, Min[n - i, i]], b[n, i - 1]]];
A063008[n_] := Product[Prime[i]^#[[i]], {i, 1, Length[#]}]& /@ b[n, n];
T[n_] := A062799 /@ A063008[n];
Table[T[n], {n, 0, 9}] // Flatten (* Jean-François Alcover, Apr 16 2025, after Alois P. Heinz in A063008 *)
-
\\ here b(n) is A062799.
b(n)={sumdiv(n, d, omega(d))}
N(sig)={prod(k=1, #sig, prime(k)^sig[k])}
Row(n)={apply(s->b(N(s)), vecsort([Vecrev(p) | p<-partitions(n)], , 4))}
{concat(vector(9, n, Row(n-1)))} \\ Andrew Howroyd, Mar 24 2020
Offset changed and terms a(50) and beyond from
Andrew Howroyd, Mar 24 2020
Comments