A001511 The ruler function: exponent of the highest power of 2 dividing 2n. Equivalently, the 2-adic valuation of 2n.
1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1
Offset: 1
A024786 Number of 2's in all partitions of n.
0, 1, 1, 3, 4, 8, 11, 19, 26, 41, 56, 83, 112, 160, 213, 295, 389, 526, 686, 911, 1176, 1538, 1968, 2540, 3223, 4115, 5181, 6551, 8191, 10269, 12756, 15873, 19598, 24222, 29741, 36532, 44624, 54509, 66261, 80524, 97446, 117862, 142029, 171036, 205290, 246211
Offset: 1
Keywords
Comments
Also number of partitions of n-1 with a distinguished part different from all the others. [Comment corrected by Emeric Deutsch, Aug 13 2008]
In general the number of times that j appears in the partitions of n equals Sum_{kA024787, ..., A024794, for j = 2,...,10; it generalizes the formula given for A000070 for j=1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
Equals row sums of triangle A173238. - Gary W. Adamson, Feb 13 2010
The sums of two successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of second largest and the sum of third largest elements in all partitions of n. More generally, the number of occurrences of k in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+1)st largest elements in all partitions of n. And more generally, the sum of the number of occurrences of k, k+1, k+2..k+m in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+m+1)st largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
Number of singletons in all partitions of n-1. A singleton in a partition is a part that occurs exactly once. Example: a(5) = 4 because in the partitions of 4, namely [1,1,1,1], [1,1,2'], [2,2], [1',3'], [4'] we have 4 singletons (marked by '). - Emeric Deutsch, Sep 12 2016
a(n) is also the number of non-isomorphic vertex-transitive cover graphs of lattice quotients of essential lattice congruences of the weak order on the symmetric group S_{n-1}. See Table 1 in the Hoang/Mütze reference in the Links section. - Torsten Muetze, Nov 28 2019
Assuming a partition is in weakly decreasing order, a(n) is also the number of times -1 occurs in the differences of the partitions of n+1. - George Beck, Mar 28 2023
Examples
From _Omar E. Pol_, Oct 25 2012: (Start) For n = 7 we have: -------------------------------------- . Number Partitions of 7 of 2's -------------------------------------- 7 .............................. 0 4 + 3 .......................... 0 5 + 2 .......................... 1 3 + 2 + 2 ...................... 2 6 + 1 .......................... 0 3 + 3 + 1 ...................... 0 4 + 2 + 1 ...................... 1 2 + 2 + 2 + 1 .................. 3 5 + 1 + 1 ...................... 0 3 + 2 + 1 + 1 .................. 1 4 + 1 + 1 + 1 .................. 0 2 + 2 + 1 + 1 + 1 .............. 2 3 + 1 + 1 + 1 + 1 .............. 0 2 + 1 + 1 + 1 + 1 + 1 .......... 1 1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0 ------------------------------------ . 24 - 13 = 11 . The difference between the sum of the second column and the sum of the third column of the set of partitions of 7 is 24 - 13 = 11 and equals the number of 2's in all partitions of 7, so a(7) = 11. (End)
References
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 184.
Links
- Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
- David Benson, Radha Kessar, and Markus Linckelmann, Hochschild cohomology of symmetric groups in low degrees, arXiv:2204.09970 [math.GR], 2022.
- Philip Cuthbertson, Fixed hooks in arbitrary columns of partitions, Integers (2025) Vol. 25, Art. No. A28. See p. 3.
- Manosij Ghosh Dastidar and Sourav Sen Gupta, Generalization of a few results in Integer Partitions, arXiv preprint arXiv:1111.0094 [cs.DM], 2011.
- Emeric Deutsch et al., Problem 11237, Amer. Math. Monthly, 115 (No. 7, 2008), 666-667. [From _Emeric Deutsch_, Aug 13 2008]
- Hung Phuc Hoang and Torsten Mütze, Combinatorial generation via permutation languages. II. Lattice congruences, arXiv:1911.12078 [math.CO], 2019.
- Joseph Vandehey, Digital problems in the theory of partitions, Integers (2024) Vol. 24A, Art. No. A18. See p. 3.
Crossrefs
Programs
-
Maple
b:= proc(n, i) option remember; local f, g; if n=0 or i=1 then [1, 0] else f:= b(n, i-1); g:= `if`(i>n, [0$2], b(n-i, i)); [f[1]+g[1], f[2]+g[2]+`if`(i=2, g[1], 0)] fi end: a:= n-> b(n, n)[2]: seq(a(n), n=1..50); # Alois P. Heinz, May 18 2012
-
Mathematica
Table[ Count[ Flatten[ IntegerPartitions[n]], 2], {n, 1, 50} ] (* Second program: *) b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, 0}, f = b[n, i - 1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i == 2, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *) Join[{0}, (1/((1 - x^2) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *) Table[Sum[(1 + (-1)^k)/2 * PartitionsP[n-k], {k, 2, n}], {n, 1, 50}] (* Vaclav Kotesovec, Aug 27 2017 *)
-
Python
from sympy import npartitions def A024786(n): return sum(npartitions(n-(k<<1)) for k in range(1,(n>>1)+1)) # Chai Wah Wu, Oct 25 2023
Formula
a(n) = Sum_{k=1..floor(n/2)} A000041(n-2k). - Christian G. Bower, Jun 22 2000
a(n) = Sum_{kA000041, P(0) = 1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
G.f.: (x^2/((1-x)*(1-x^2)^2))*Product_{j>=3} 1/(1-x^j) from Riordan reference second term, last eq.
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(5/2) * Pi * sqrt(n)) * (1 - 25*Pi/(24*sqrt(6*n)) + (25/48 + 433*Pi^2/6912)/n). - Vaclav Kotesovec, Mar 07 2016, extended Nov 05 2016
a(n) = Sum_{k} k * A116595(n-1,k). - Emeric Deutsch, Sep 12 2016
G.f.: x^2/((1 - x)*(1 - x^2)) * Sum_{n >= 0} x^(2*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A004526 (partitions into 2 parts, or, modulo offset differences, partitions into parts <= 2) and A002865 (partitions into parts >= 2). - Peter Bala, Jan 17 2021
A092119 EULER transform of A001511.
1, 1, 3, 4, 10, 13, 26, 35, 66, 88, 150, 202, 331, 442, 688, 919, 1394, 1848, 2716, 3590, 5174, 6796, 9589, 12542, 17440, 22680, 31055, 40208, 54420, 70096, 93772, 120256, 159380, 203436, 267142, 339573, 442478, 560050, 724302, 913198, 1173375, 1473622
Offset: 0
Keywords
Comments
From Gary W. Adamson, Feb 11 2010: (Start)
Given A000041, P(x) = A(x)/A(x^2) with P(x) = (1 + x + 2x^2 + 3x^3 + 5x^4 + 7x^5 + ...),
A(x) = (1 + x + 3x^2 + 4x^3 + 10x^4 + 13x^5 + ...),
A(x^2) = (1 + x^2 + 3x^4 + 4x^6 + 10x^8 + ...), where A092119 = (1, 1, 3, 4, 10, ...) = Euler transform of the ruler sequence, A001511. (End)
Let M = triangle A173238 as an infinite lower triangular matrix. Then A092119 = lim_{n->infinity} M^n. Let P(x) = polcoeff A000041 = (1 + x + 2x^2 + 3x^3 + ...), and A(x) = polcoeff A092119. Then P(x) = A(x) / A(x^2), an example of a conjectured infinite set of operations (cf. A173238). - Gary W. Adamson, Feb 13 2010
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
- N. J. A. Sloane, Transforms
Crossrefs
Cf. A000041. - Gary W. Adamson, Feb 11 2010
Cf. A173241.
Programs
-
Maple
# Uses EulerTransform from A358369. t := EulerTransform(n -> padic[ordp](2*n, 2)): seq(t(n), n = 0..41); # Peter Luschny, Nov 18 2022
-
Mathematica
m = 42; 1/Product[QPochhammer[x^(2^k)], {k, 0, Log[2, m]//Ceiling}] + O[x]^m // CoefficientList[#, x]& (* Jean-François Alcover, Jan 14 2020, after Joerg Arndt *)
-
PARI
N=66; x='x+O('x^N); /* that many terms */ gf=1/prod(e=0,ceil(log(N)/log(2)),eta(x^(2^e))); Vec(gf) /* show terms */ /* Joerg Arndt, Jun 21 2011 */
Formula
G.f.: 1/Product_{k>=0} P(x^(2^k)) where P(x) = Product_{k>=1} (1 - x^k). - Joerg Arndt, Jun 21 2011
A173241 Euler transform of A051064, the ruler function sequence for k=3.
1, 1, 2, 4, 6, 9, 16, 22, 33, 51, 71, 100, 147, 199, 275, 384, 515, 692, 944, 1242, 1645, 2186, 2847, 3706, 4848, 6231, 8019, 10330, 13153, 16729, 21305, 26864, 33858, 42658, 53366, 66668, 83277, 103378, 128200, 158846, 195895, 241237, 296860, 363796, 445285, 544465, 663520
Offset: 0
Keywords
Comments
Examples
Equals 1/((1-x)*(1-x^2)*(1-x^3)^2*(1-x^4)*(1-x^5)*(1-x^6)^2*(1-x^7)*...); where in (1-x)^k, k = A051064: (1, 1, 2, 1, 1, 2, 1, 1, 3, ...).
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
Programs
-
PARI
N=66; x='x+O('x^N); /* that many terms */ gf=1/prod(e=0, ceil(log(N)/log(3)), eta(x^(3^e))); Vec(gf) /* show terms */ /* Joerg Arndt, Jun 21 2011 */
Formula
G.f.: 1/Product_{k>=0} P(x^(3^k)) where P(x)=Product_{k>=1} (1-x^k). - Joerg Arndt, Jun 21 2011
(1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, ...).
Extensions
More terms from Joerg Arndt, Jun 21 2011
A173239 Triangle by columns, A000041 shifted down thrice, k>=0.
1, 1, 2, 3, 1, 5, 1, 7, 2, 11, 3, 1, 15, 5, 1, 22, 7, 2, 30, 11, 3, 1, 42, 15, 5, 1, 56, 22, 7, 2, 77, 30, 11, 3, 1, 101, 42, 15, 5, 1, 135, 56, 22, 7, 2, 176, 77, 30, 11, 3, 1, 231, 101, 42, 15, 5, 1, 297, 135, 56, 22, 7, 2, 385, 176, 77, 30, 11, 3, 1
Offset: 0
Comments
Row sums = A024787, the numbers of 3's in all partitions of n, where A024787 starts with offset 1: (0, 0, 1, 1, 2, 4, 6, 9, 15,...). Triangle A173239 row sums start with the first "1" of A024787.
Let the triangle = M as an infinite lower triangular matrix. Then Lim_{n->inf} = A173241, the Euler transform of A051064 (the ruler function for 3).
Examples
First few rows of the triangle = 1; 1; 2; 3, 1; 5, 1; 7, 2; 11, 3, 1; 15, 5, 1; 22, 7, 2; 30, 11, 3, 1; 42, 15, 5, 1; 56, 22, 7, 2; 77, 30, 11, 3, 1; 101, 42, 15, 5, 1; 135, 56, 22, 7, 2; 176, 77, 30, 11, 3, 1; 231, 101, 42, 15, 5, 1; 297, 135, 56, 22, 7, 2; 385, 176, 77, 30, 11, 3, 1; 490, 231, 101, 42, 15, 5, 1; 627, 297, 135, 56, 22, 7, 2; 792, 385, 176, 77, 30, 11, 3, 1; 1002,490, 231, 101, 42, 15, 5, 1; 1255, 627, 297, 135, 56, 22, 7, 2; 1575, 792, 385, 176, 77, 30, 11, 3, 1; ...
Formula
T(n,k) = A000041(n-3*k) for k=0..floor(n/3).
Comments
Examples
References
Links
Crossrefs
Programs
Haskell
Haskell
MATLAB
Magma
Maple
Mathematica
PARI
PARI
PARI
PARI
Python
Python
Python
Sage
Scheme
Formula
Extensions