Displaying 1-10 of 22 results found.
a(n) = n*d(n), where d(n) = number of divisors of n ( A000005).
+10
110
1, 4, 6, 12, 10, 24, 14, 32, 27, 40, 22, 72, 26, 56, 60, 80, 34, 108, 38, 120, 84, 88, 46, 192, 75, 104, 108, 168, 58, 240, 62, 192, 132, 136, 140, 324, 74, 152, 156, 320, 82, 336, 86, 264, 270, 184, 94, 480, 147, 300, 204, 312, 106, 432, 220, 448, 228, 232, 118
COMMENTS
Dirichlet convolution of f(n)=n with itself. See the Apostol reference for Dirichlet convolutions. - Wolfdieter Lang, Sep 09 2008
Sum of all parts of all partitions of n into equal parts. - Omar E. Pol, Jan 18 2013
REFERENCES
Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, pp. 29 ff.
FORMULA
Dirichlet g.f.: zeta(s-1)^2.
Sum_{k=1..n} sigma(gcd(n, k)). Multiplicative with a(p^e) = (e+1)*p^e. - Vladeta Jovovic, Oct 30 2001
L.g.f.: Sum_{k>=1} x^k/(1 - x^k) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 13 2017
G.f.: Sum_{n >= 1} q^(n^2)*(n^2 + 2*n*q^n - n^2*q^(2*n))/(1 - q^n)^2. - Peter Bala, Jan 22 2021
a(n) = Sum_{k=1..n} sigma(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 07 2021
Define f(x) = #{n <= x: a(n) <= x}. Gabdullin & Iudelevich show that f(x) ~ x/sqrt(log x). That is, there are 0 < A < B such that Ax/sqrt(log x) < f(x) < Bx/sqrt(log x). - Charles R Greathouse IV, Mar 15 2022
Sum_{k=1..n} a(k) ~ n^2*log(n)/2 + (gamma - 1/4)*n^2, where gamma is Euler's constant ( A001620). - Amiram Eldar, Oct 25 2022
EXAMPLE
For n = 6 the partitions of 6 into equal parts are [6], [3, 3], [2, 2, 2], [1, 1, 1, 1, 1, 1]. The sum of all parts is 6 + 3 + 3 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 = 24 equalling 6 times the number of divisors of 6, so a(6) = 24. - Omar E. Pol, May 08 2021
MAPLE
with(numtheory): A038040 := n->tau(n)*n;
PROG
(PARI) a(n)=if(n<1, 0, direuler(p=2, n, 1/(1-p*X)^2)[n])
(PARI) a(n)=if(n<1, 0, polcoeff(sum(k=1, n, k*x^k/(x^k-1)^2, x*O(x^n)), n)) /* Michael Somos, Jan 29 2005 */
(Haskell)
(Python)
from sympy import divisor_count as d
def a(n): return n*d(n)
Number of compositions minus number of partitions: A011782(n) - A000041(n).
+10
29
0, 0, 0, 1, 3, 9, 21, 49, 106, 226, 470, 968, 1971, 3995, 8057, 16208, 32537, 65239, 130687, 261654, 523661, 1047784, 2096150, 4193049, 8387033, 16775258, 33551996, 67105854, 134214010, 268430891, 536865308, 1073734982, 2147475299, 4294957153, 8589922282
COMMENTS
Previous name was: Counts members of A056808 by number of factors.
a(n) is also the number of compositions of n that are not partitions of n. - Omar E. Pol, Jan 31 2009, Oct 14 2013
a(n) is the number of compositions of n into positive parts containing pattern [1,2]. - Bob Selcoe, Jul 08 2014
FORMULA
G.f.: (1 - x) / (1 - 2*x) - Product_{k>=1} 1 / (1 - x^k). - Ilya Gutkovskiy, Jan 30 2020
EXAMPLE
A011782 begins 1 1 2 4 8 16 32 64 128 256 ...;
A000041 begins 1 1 2 3 5 7 11 15 22 30 ...;
so sequence begins 0 0 0 1 3 9 21 49 106 226 ... .
For n = 3 the factorizations are 8=2*2*2, 12=2*2*3, 18=2*3*3 and 30=2*3*5.
a(5) = 9: {[1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,2,2], [1,3,1], [1,4], [2,1,2], [2,3]}. - Bob Selcoe, Jul 08 2014
MAPLE
a:= n-> ceil(2^(n-1))-combinat[numbpart](n):
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !GreaterEqual@@#&]], {n, 0, 10}] (* Gus Wiseman, Jun 24 2020 *)
a[n_] := If[n == 0, 0, 2^(n-1) - PartitionsP[n]];
CROSSREFS
The version for patterns is A002051.
(1,2)-avoiding compositions are just partitions A000041.
The (1,1)-matching version is A261982.
The version for prime indices is A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns matched by compositions are counted by A335456.
Number of partitions p of n such that (number of distinct parts of p) <= max(p) - min(p).
+10
19
0, 0, 0, 0, 1, 2, 4, 7, 12, 17, 27, 38, 54, 75, 104, 137, 187, 245, 322, 418, 542, 691, 887, 1121, 1417, 1777, 2228, 2767, 3441, 4247, 5235, 6424, 7871, 9594, 11688, 14173, 17168, 20723, 24979, 30008, 36010, 43085, 51479, 61357, 73032, 86718, 102852, 121718
COMMENTS
Also the number of partitions of n with at least one gap, i.e., partitions whose parts do not form a contiguous interval. These partitions are ranked by A073492. For example, the a(0) = 0 through a(8) = 12 partitions are:
. . . . (31) (41) (42) (52) (53)
(311) (51) (61) (62)
(411) (331) (71)
(3111) (421) (422)
(511) (431)
(4111) (521)
(31111) (611)
(3311)
(4211)
(5111)
(41111)
(311111)
Also the number of non-constant partitions of n with a repeated non-maximal part, ranked by A065201. The a(0) = 0 through a(8) = 12 partitions are:
. . . . (211) (311) (411) (322) (422)
(2111) (2211) (511) (611)
(3111) (3211) (3221)
(21111) (4111) (3311)
(22111) (4211)
(31111) (5111)
(211111) (22211)
(32111)
(41111)
(221111)
(311111)
(2111111)
(End)
EXAMPLE
a(6) counts these 4 partitions: 51, 42, 411, 3111.
MATHEMATICA
z = 60; d[p_] := d[p] = Length[DeleteDuplicates[p]]; f[p_] := f[p] = Max[p] - Min[p]; g[n_] := g[n] = IntegerPartitions[n];
Table[Count[g[n], p_ /; d[p] < f[p]], {n, 0, z}] (* A239954*)
Table[Count[g[n], p_ /; d[p] <= f[p]], {n, 0, z}] (* A239955*)
Table[Count[g[n], p_ /; d[p] == f[p]], {n, 0, z}] (* A239956*)
Table[Count[g[n], p_ /; d[p] > f[p]], {n, 0, z}] (* A034296*)
Table[Count[g[n], p_ /; d[p] >= f[p]], {n, 0, z}] (* A239958*)
(* second program *)
Table[Length[Select[IntegerPartitions[n], Min@@Differences[#]<-1&]], {n, 0, 30}] (* Gus Wiseman, Jun 26 2022 *)
CROSSREFS
Applying the condition to the conjugate gives A350839, ranked by A350841.
A116932 counts partitions with differences != -1 or -2, strict A025157.
Number of integer partitions of n such that every permutation has all distinct runs.
+10
18
1, 1, 2, 3, 4, 5, 8, 9, 11, 14, 18, 20, 25, 28, 34, 41, 47, 53, 64, 72, 84, 98, 113, 128, 148, 169, 194, 223, 255, 289, 333, 377, 428, 488, 554, 629, 715, 807, 913, 1033, 1166, 1313, 1483, 1667, 1875, 2111, 2369, 2655, 2977, 3332, 3729, 4170, 4657, 5195, 5797, 6459
COMMENTS
Partitions enumerated by this sequence include those in which all parts are either the same or distinct as well as partitions with an even number of parts all of which except one are the same. - Andrew Howroyd, Feb 15 2022
EXAMPLE
The a(1) = 1 through a(8) = 11 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(111) (31) (41) (42) (52) (53)
(1111) (2111) (51) (61) (62)
(11111) (222) (421) (71)
(321) (2221) (431)
(3111) (4111) (521)
(111111) (211111) (2222)
(1111111) (5111)
(311111)
(11111111)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Select[Permutations[#], !UnsameQ@@Split[#]&]=={}&]], {n, 0, 15}]
PROG
Q(n)={polcoef(prod(k=1, n, 1 + x^k + O(x*x^n)), n)}
a(n)={Q(n) + if(n, numdiv(n) - 1) + sum(k=1, (n-1)\3, sum(j=3, (n-1)\k, j%2==1 && n-k*j<>k))} \\ Andrew Howroyd, Feb 15 2022
CROSSREFS
The version for run-lengths instead of runs is A000005.
The version for normal multisets is 2^(n-1) - A283353(n-3).
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A098859 counts partitions with distinct multiplicities, ordered A242882.
A297770 counts distinct runs in binary expansion.
A003242 counts anti-run compositions.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
Number of integer partitions of n with a difference < -1 and a conjugate difference < -1.
+10
16
0, 0, 0, 0, 0, 1, 2, 3, 7, 11, 17, 26, 39, 54, 81, 108, 148, 201, 269, 353, 467, 601, 779, 995, 1272, 1605, 2029, 2538, 3171, 3941, 4881, 6012, 7405, 9058, 11077, 13478, 16373, 19817, 23953, 28850, 34692, 41599, 49802, 59461, 70905, 84321, 100155, 118694
COMMENTS
We define a difference of a partition to be a difference of two adjacent parts.
EXAMPLE
The a(5) = 1 through a(10) = 17 partitions:
(311) (411) (511) (422) (522) (622)
(3111) (4111) (611) (711) (811)
(31111) (3311) (4221) (4222)
(4211) (4311) (4411)
(5111) (5211) (5221)
(41111) (6111) (5311)
(311111) (33111) (6211)
(42111) (7111)
(51111) (42211)
(411111) (43111)
(3111111) (52111)
(61111)
(331111)
(421111)
(511111)
(4111111)
(31111111)
MATHEMATICA
conj[y_]:=If[Length[y]==0, y, Table[Length[Select[y, #>=k&]], {k, 1, Max[y]}]];
Table[Length[Select[IntegerPartitions[n], (Min@@Differences[#]<-1)&&(Min@@Differences[conj[#]]<-1)&]], {n, 0, 30}]
CROSSREFS
Allowing -1 gives A144300 = non-constant partitions.
These partitions are ranked by A350841.
A277103 = partitions with the same number of odd parts as their conjugate.
Number of integer partitions of n where 2*(number of distinct parts) >= (number of parts).
+10
15
1, 1, 2, 2, 4, 6, 8, 11, 15, 20, 30, 38, 49, 65, 83, 108, 139, 178, 224, 286, 358, 437, 550, 684, 837, 1037, 1269, 1553, 1889, 2295, 2770, 3359, 4035, 4843, 5808, 6951, 8312, 9902, 11752, 13958, 16531, 19541, 23037, 27162, 31911, 37488, 43950, 51463, 60127, 70229
EXAMPLE
The a(1) = 1 through a(7) = 11 partitions:
(1) (2) (3) (4) (5) (6) (7)
(11) (21) (22) (32) (33) (43)
(31) (41) (42) (52)
(211) (221) (51) (61)
(311) (321) (322)
(2111) (411) (331)
(2211) (421)
(3111) (511)
(2221)
(3211)
(4111)
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t>=0, 1, 0),
`if`(i<1, 0, add(b(n-i*j, i-1, t+`if`(j>0, 2, 0)-j), j=0..n/i)))
end:
a:= n-> b(n$2, 0):
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], 2*Length[Union[#]]>=Length[#]&]], {n, 0, 30}]
CROSSREFS
These partitions have ranks A361395.
A116608 counts partitions by number of distinct parts.
Number of integer partitions of n of whose permutations do not all have distinct runs.
+10
14
0, 0, 0, 0, 1, 2, 3, 6, 11, 16, 24, 36, 52, 73, 101, 135, 184, 244, 321, 418, 543, 694, 889, 1127, 1427, 1789, 2242, 2787, 3463, 4276, 5271, 6465, 7921, 9655, 11756, 14254, 17262, 20830, 25102, 30152, 36172, 43270, 51691, 61594, 73300, 87023, 103189, 122099, 144296, 170193, 200497
EXAMPLE
The a(4) = 1 through a(9) = 16 partitions:
(211) (221) (411) (322) (332) (441)
(311) (2211) (331) (422) (522)
(21111) (511) (611) (711)
(3211) (3221) (3321)
(22111) (3311) (4221)
(31111) (4211) (4311)
(22211) (5211)
(32111) (22221)
(41111) (32211)
(221111) (33111)
(2111111) (42111)
(51111)
(222111)
(321111)
(2211111)
(3111111)
For example, the partition x = (2,1,1,1,1) has the permutation (1,1,2,1,1), with runs (1,1), (2), (1,1), which are not all distinct, so x is counted under a(6).
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], MemberQ[Permutations[#], _?(!UnsameQ@@Split[#]&)]&]], {n, 0, 15}]
PROG
(Python)
from sympy.utilities.iterables import partitions
from itertools import permutations, groupby
from collections import Counter
c = 0
for s, p in partitions(n, size=True):
for q in permutations(Counter(p).elements(), s):
if max(Counter(tuple(g) for k, g in groupby(q)).values(), default=0) > 1:
c += 1
break
CROSSREFS
The version for run-lengths instead of runs is A144300.
The version for normal multisets is A283353.
The Heinz numbers of these partitions are A351201.
The complement is counted by A351204.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A098859 counts partitions with distinct multiplicities, ordered A242882.
A297770 counts distinct runs in binary expansion.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
Cf. A000041, A035363, A047993, A116608, A238130 or A238279, A325545, A329746, A350842, A351003, A351004, A351291.
Number of partitions of n with largest inscribed rectangle having area <= k; triangle T(n,k), 0<=n, 0<=k<=n, read by rows.
+10
13
1, 0, 1, 0, 0, 2, 0, 0, 1, 3, 0, 0, 0, 2, 5, 0, 0, 0, 1, 5, 7, 0, 0, 0, 0, 5, 7, 11, 0, 0, 0, 0, 3, 7, 13, 15, 0, 0, 0, 0, 1, 5, 16, 18, 22, 0, 0, 0, 0, 0, 3, 17, 21, 27, 30, 0, 0, 0, 0, 0, 1, 16, 22, 34, 38, 42, 0, 0, 0, 0, 0, 0, 13, 21, 39, 48, 54, 56
COMMENTS
T(n,k) = A000041(k) for n<k is omitted from the triangle.
FORMULA
T(n,k) = Sum_{i=1..k} A115723(n,i) for n>0, T(0,0) = 1.
EXAMPLE
T(5,4) = 5 because there are 5 partitions of 5 with largest inscribed rectangle having area <= 4: [1,1,1,2], [1,2,2], [1,1,3], [2,3], [1,4].
T(9,5) = 3: [1,1,1,2,4], [1,1,1,1,5], [1,1,2,5].
Triangle T(n,k) begins:
1;
0, 1;
0, 0, 2;
0, 0, 1, 3;
0, 0, 0, 2, 5;
0, 0, 0, 1, 5, 7;
0, 0, 0, 0, 5, 7, 11;
0, 0, 0, 0, 3, 7, 13, 15;
0, 0, 0, 0, 1, 5, 16, 18, 22;
0, 0, 0, 0, 0, 3, 17, 21, 27, 30;
0, 0, 0, 0, 0, 1, 16, 22, 34, 38, 42;
...
MAPLE
b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
`if`(i=1, `if`(t+n<=k, 1, 0), `if`(i<1, 0, b(n, i-1, t, k)+
add(`if`(t+j<=k/i, b(n-i*j, i-1, t+j, k), 0), j=1..n/i))))
end:
T:= (n, k)-> b(n, n, 0, k):
seq(seq(T(n, k), k=0..n), n=0..15);
MATHEMATICA
b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i == 1, If[t + n <= k, 1, 0], If[i < 1, 0, b[n, i - 1, t, k] + Sum[If[t + j <= k/i, b[n - i*j, i - 1, t + j, k], 0], {j, 1, n/i}]]]] ; T[n_, k_] := b[n, n, 0, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 15}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
Number of integer partitions of n that are not constant but satisfy (mean) = (median) = (mode), assuming there is a unique mode.
+10
9
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 4, 0, 3, 3, 7, 0, 12, 0, 18, 12, 9, 0, 50, 12, 14, 33, 54, 0, 115, 0, 92, 75, 31, 99, 323, 0, 45, 162, 443, 0, 507, 0, 467, 732, 88, 0, 1551, 274, 833, 627, 1228, 0, 2035, 1556, 2859, 1152, 221, 0, 9008, 0, 295, 4835, 5358
COMMENTS
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
EXAMPLE
The a(8) = 1 through a(18) = 12 partitions:
3221 . 32221 . 4332 . 3222221 43332 5443 . 433332
5331 3322211 53331 6442 443331
322221 4222211 63321 7441 533322
422211 32222221 533331
33222211 543321
42222211 633321
52222111 733311
322222221
332222211
422222211
432222111
522222111
MATHEMATICA
modes[ms_]:=Select[Union[ms], Count[ms, #]>=Max@@Length/@Split[ms]&];
Table[Length[Select[IntegerPartitions[n], !SameQ@@#&&{Mean[#]}=={Median[#]}==modes[#]&]], {n, 30}]
CROSSREFS
These partitions have ranks A363729.
A008284 counts partitions by length (or decreasing mean), strict A008289.
A362608 counts partitions with a unique mode.
Number of 1 X (n+1) 0..1 arrays with every row least squares fitting to a positive-slope straight line and every column least squares fitting to a zero- or positive-slope straight line, with a single point array taken as having zero slope.
+10
8
1, 2, 6, 12, 28, 54, 119, 230, 488, 948, 1979, 3860, 7978, 15624, 32072, 63014, 128746, 253588, 516346, 1019072, 2069590, 4091174, 8291746, 16412668, 33210428, 65808044, 132985161, 263755984, 532421062, 1056789662, 2131312530, 4233176854
COMMENTS
Also appears to be the number of integer compositions of n + 2 with weighted sum greater than reverse-weighted sum, where the weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i * y_i, and the reverse is Sum_{i=1..k} i * y_{k-i+1}. The a(1) = 1 through a(4) = 12 compositions are:
(21) (31) (32) (42)
(211) (41) (51)
(221) (231)
(311) (312)
(1211) (321)
(2111) (411)
(1311)
(2121)
(2211)
(3111)
(12111)
(21111)
(End)
EXAMPLE
Some solutions for n=3:
0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 1
CROSSREFS
For >= instead of > we have A222855.
A053632 counts compositions by weighted sum (or reverse-weighted sum).
Search completed in 0.023 seconds
|