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.

Showing 1-10 of 18 results. Next

A356233 Number of integer factorizations of n into gapless numbers (A066311).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 1, 4, 1, 1, 2, 5, 1, 4, 1, 2, 1, 1, 1, 7, 2, 1, 3, 2, 1, 4, 1, 7, 1, 1, 2, 9, 1, 1, 1, 3, 1, 2, 1, 2, 4, 1, 1, 12, 2, 2, 1, 2, 1, 7, 1, 3, 1, 1, 1, 8, 1, 1, 2, 11, 1, 2, 1, 2, 1, 2, 1, 16, 1, 1, 4, 2, 2, 2, 1, 5, 5, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. We define a number to be gapless (listed by A066311) iff its prime indices cover an interval of positive integers.

Examples

			The counted factorizations of n = 2, 4, 8, 12, 24, 36, 48:
  (2)  (4)    (8)      (12)     (24)       (36)       (48)
       (2*2)  (2*4)    (2*6)    (3*8)      (4*9)      (6*8)
              (2*2*2)  (3*4)    (4*6)      (6*6)      (2*24)
                       (2*2*3)  (2*12)     (2*18)     (3*16)
                                (2*2*6)    (3*12)     (4*12)
                                (2*3*4)    (2*2*9)    (2*3*8)
                                (2*2*2*3)  (2*3*6)    (2*4*6)
                                           (3*3*4)    (3*4*4)
                                           (2*2*3*3)  (2*2*12)
                                                      (2*2*2*6)
                                                      (2*2*3*4)
                                                      (2*2*2*2*3)
		

Crossrefs

The shortest of these factorizations is listed at A356234, length A287170.
A000005 counts divisors.
A001055 counts factorizations.
A001221 counts distinct prime factors, sum A001414.
A003963 multiplies together the prime indices.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).
A356226 lists the lengths of maximal gapless submultisets of prime indices:
- length: A287170
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356232

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    sqq[n_]:=Max@@Differences[primeMS[n]]<=1;
    Table[Length[Select[facs[n],And@@sqq/@#&]],{n,100}]

A001227 Number of odd divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 3, 2, 2, 4, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 1, 4, 2, 4, 3, 2, 2, 4, 2, 2, 4, 2, 2, 6, 2, 2, 2, 3, 3, 4, 2, 2, 4, 4, 2, 4, 2, 2, 4, 2, 2, 6, 1, 4, 4, 2, 2, 4, 4, 2, 3, 2, 2, 6, 2, 4, 4, 2, 2, 5, 2, 2, 4, 4, 2, 4, 2, 2, 6, 4, 2, 4, 2, 4, 2, 2, 3, 6, 3, 2, 4, 2, 2, 8
Offset: 1

Views

Author

Keywords

Comments

Also (1) number of ways to write n as difference of two triangular numbers (A000217), see A136107; (2) number of ways to arrange n identical objects in a trapezoid. - Tom Verhoeff
Also number of partitions of n into consecutive positive integers including the trivial partition of length 1 (e.g., 9 = 2+3+4 or 4+5 or 9 so a(9)=3). (Useful for cribbage players.) See A069283. - Henry Bottomley, Apr 13 2000
This has been described as Sylvester's theorem, but to reduce ambiguity I suggest calling it Sylvester's enumeration. - Gus Wiseman, Oct 04 2022
a(n) is also the number of factors in the factorization of the Chebyshev polynomial of the first kind T_n(x). - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 28 2003
Number of factors in the factorization of the polynomial x^n+1 over the integers. See also A000005. - T. D. Noe, Apr 16 2003
a(n) = 1 if and only if n is a power of 2 (see A000079). - Lekraj Beedassy, Apr 12 2005
Number of occurrences of n in A049777. - Philippe Deléham, Jun 19 2005
For n odd, n is prime if and only if a(n) = 2. - George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Sep 10 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly once. Example: a(9)=3 because we have [3,3,2,1],[2,2,2,2,1] and [1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
Also the number of factors of the n-th Lucas polynomial. - T. D. Noe, Mar 09 2006
Lengths of rows of triangle A182469;
Denoted by Delta_0(n) in Glaisher 1907. - Michael Somos, May 17 2013
Also the number of partitions p of n into distinct parts such that max(p) - min(p) < length(p). - Clark Kimberling, Apr 18 2014
Row sums of triangle A247795. - Reinhard Zumkeller, Sep 28 2014
Row sums of triangle A237048. - Omar E. Pol, Oct 24 2014
A069288(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
a(n) is equal to the number of ways to write 2*n-1 as (4*x + 2)*y + 4*x + 1 where x and y are nonnegative integers. Also a(n) is equal to the number of distinct values of k such that k/(2*n-1) + k divides (k/(2*n-1))^(k/(2*n-1)) + k, (k/(2*n-1))^k + k/(2*n-1) and k^(k/(2*n-1)) + k/(2*n-1). - Juri-Stepan Gerasimov, May 23 2016, Jul 15 2016
Also the number of odd divisors of n*2^m for m >= 0. - Juri-Stepan Gerasimov, Jul 15 2016
a(n) is odd if and only if n is a square or twice a square. - Juri-Stepan Gerasimov, Jul 17 2016
a(n) is also the number of subparts in the symmetric representation of sigma(n). For more information see A279387 and A237593. - Omar E. Pol, Nov 05 2016
a(n) is also the number of partitions of n into an odd number of equal parts. - Omar E. Pol, May 14 2017 [This follows from the g.f. Sum_{k >= 1} x^k/(1-x^(2*k)). - N. J. A. Sloane, Dec 03 2020]

Examples

			G.f. = q + q^2 + 2*q^3 + q^4 + 2*q^5 + 2*q^6 + 2*q^7 + q^8 + 3*q^9 + 2*q^10 + ...
From _Omar E. Pol_, Nov 30 2020: (Start)
For n = 9 there are three odd divisors of 9; they are [1, 3, 9]. On the other hand there are three partitions of 9 into consecutive parts: they are [9], [5, 4] and [4, 3, 2], so a(9) = 3.
Illustration of initial terms:
                              Diagram
   n   a(n)                         _
   1     1                        _|1|
   2     1                      _|1 _|
   3     2                    _|1  |1|
   4     1                  _|1   _| |
   5     2                _|1    |1 _|
   6     2              _|1     _| |1|
   7     2            _|1      |1  | |
   8     1          _|1       _|  _| |
   9     3        _|1        |1  |1 _|
  10     2      _|1         _|   | |1|
  11     2    _|1          |1   _| | |
  12     2   |1            |   |1  | |
...
a(n) is the number of horizontal line segments in the n-th level of the diagram. For more information see A286001. (End)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 487 Entry 47.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 306.
  • J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4).
  • Ronald. L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, 2nd ed. (Addison-Wesley, 1994), see exercise 2.30 on p. 65.
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 28.

Crossrefs

If this sequence counts gapless sets by sum (by Sylvester's enumeration), these sets are ranked by A073485 and A356956. See also A055932, A066311, A073491, A107428, A137921, A333217, A356224, A356841, A356845.
Dirichlet inverse is A327276.

Programs

  • Haskell
    a001227 = sum . a247795_row
    -- Reinhard Zumkeller, Sep 28 2014, May 01 2012, Jul 25 2011
    
  • Magma
    [NumberOfDivisors(n)/Valuation(2*n, 2): n in [1..100]]; // Vincenzo Librandi, Jun 02 2019
    
  • Maple
    for n from 1 by 1 to 100 do s := 0: for d from 1 by 2 to n do if n mod d = 0 then s := s+1: fi: od: print(s); od:
    A001227 := proc(n) local a,d;
        a := 1 ;
        for d in ifactors(n)[2] do
            if op(1,d) > 2 then
                a := a*(op(2,d)+1) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    f[n_] := Block[{d = Divisors[n]}, Count[ OddQ[d], True]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Aug 27 2004 *)
    Table[Total[Mod[Divisors[n], 2]],{n,105}] (* Zak Seidov, Apr 16 2010 *)
    f[n_] := Block[{d = DivisorSigma[0, n]}, If[ OddQ@ n, d, d - DivisorSigma[0, n/2]]]; Array[f, 105] (* Robert G. Wilson v *)
    a[ n_] := Sum[  Mod[ d, 2], { d, Divisors[ n]}]; (* Michael Somos, May 17 2013 *)
    a[ n_] := DivisorSum[ n, Mod[ #, 2] &]; (* Michael Somos, May 17 2013 *)
    Count[Divisors[#],?OddQ]&/@Range[110] (* _Harvey P. Dale, Feb 15 2015 *)
    (* using a262045 from A262045 to compute a(n) = number of subparts in the symmetric representation of sigma(n) *)
    (* cl = current level, cs = current subparts count *)
    a001227[n_] := Module[{cs=0, cl=0, i, wL, k}, wL=a262045[n]; k=Length[wL]; For[i=1, i<=k, i++, If[wL[[i]]>cl, cs++; cl++]; If[wL[[i]]Hartmut F. W. Hoft, Dec 16 2016 *)
    a[n_] := DivisorSigma[0, n / 2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jun 12 2022 *)
  • PARI
    {a(n) = sumdiv(n, d, d%2)}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    {a(n) = direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( 4, p) * X))[n]}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    a(n)=numdiv(n>>valuation(n,2)) \\ Charles R Greathouse IV, Mar 16 2011
    
  • PARI
    a(n)=sum(k=1,round(solve(x=1,n,x*(x+1)/2-n)),(k^2-k+2*n)%(2*k)==0) \\ Charles R Greathouse IV, May 31 2013
    
  • PARI
    a(n)=sumdivmult(n,d,d%2) \\ Charles R Greathouse IV, Aug 29 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import factorint
    def A001227(n): return reduce(mul,(q+1 for p, q in factorint(n).items() if p > 2),1) # Chai Wah Wu, Mar 08 2021
  • SageMath
    def A001227(n): return len([1 for d in divisors(n) if is_odd(d)])
    [A001227(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

Dirichlet g.f.: zeta(s)^2*(1-1/2^s).
Comment from N. J. A. Sloane, Dec 02 2020: (Start)
By counting the odd divisors f n in different ways, we get three different ways of writing the ordinary generating function. It is:
A(x) = x + x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8 + 3*x^9 + 2*x^10 + ...
= Sum_{k >= 1} x^(2*k-1)/(1-x^(2*k-1))
= Sum_{k >= 1} x^k/(1-x^(2*k))
= Sum_{k >= 1} x^(k*(k+1)/2)/(1-x^k) [Ramanujan, 2nd notebook, p. 355.].
(This incorporates comments from Vladeta Jovovic, Oct 16 2002 and Michael Somos, Oct 30 2005.) (End)
G.f.: x/(1-x) + Sum_{n>=1} x^(3*n)/(1-x^(2*n)), also L(x)-L(x^2) where L(x) = Sum_{n>=1} x^n/(1-x^n). - Joerg Arndt, Nov 06 2010
a(n) = A000005(n)/(A007814(n)+1) = A000005(n)/A001511(n).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p > 2. - David W. Wilson, Aug 01 2001
a(n) = A000005(A000265(n)). - Lekraj Beedassy, Jan 07 2005
Moebius transform is period 2 sequence [1, 0, ...] = A000035, which means a(n) is the Dirichlet convolution of A000035 and A057427.
a(n) = A113414(2*n). - N. J. A. Sloane, Jan 24 2006 (corrected Nov 10 2007)
a(n) = A001826(n) + A001842(n). - Reinhard Zumkeller, Apr 18 2006
Sequence = M*V = A115369 * A000005, where M = an infinite lower triangular matrix and V = A000005, d(n); as a vector: [1, 2, 2, 3, 2, 4, ...]. - Gary W. Adamson, Apr 15 2007
Equals A051731 * [1,0,1,0,1,...]; where A051731 is the inverse Mobius transform. - Gary W. Adamson, Nov 06 2007
a(n) = A000005(n) - A183063(n).
a(n) = d(n) if n is odd, or d(n) - d(n/2) if n is even, where d(n) is the number of divisors of n (A000005). (See the Weisstein page.) - Gary W. Adamson, Mar 15 2011
Dirichlet convolution of A000005 and A154955 (interpreted as a flat sequence). - R. J. Mathar, Jun 28 2011
a(A000079(n)) = 1; a(A057716(n)) > 1; a(A093641(n)) <= 2; a(A038550(n)) = 2; a(A105441(n)) > 2; a(A072502(n)) = 3. - Reinhard Zumkeller, May 01 2012
a(n) = 1 + A069283(n). - R. J. Mathar, Jun 18 2015
a(A002110(n)/2) = n, n >= 1. - Altug Alkan, Sep 29 2015
a(n*2^m) = a(n*2^i), a((2*j+1)^n) = n+1 for m >= 0, i >= 0 and j >= 0. a((2*x+1)^n) = a((2*y+1)^n) for positive x and y. - Juri-Stepan Gerasimov, Jul 17 2016
Conjectures: a(n) = A067742(n) + 2*A131576(n) = A082647(n) + A131576(n). - Omar E. Pol, Feb 15 2017
a(n) = A000005(2n) - A000005(n) = A099777(n)-A000005(n). - Danny Rorabaugh, Oct 03 2017
L.g.f.: -log(Product_{k>=1} (1 - x^(2*k-1))^(1/(2*k-1))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
G.f.: (psi_{q^2}(1/2) + log(1-q^2))/log(q), where psi_q(z) is the q-digamma function. - Michael Somos, Jun 01 2019
a(n) = A003056(n) - A238005(n). - Omar E. Pol, Sep 12 2021
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma + log(2)/2 - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = log(2) (A002162). - Amiram Eldar, Mar 01 2023
a(n) = Sum_{i=1..n} (-1)^(i+1)*A135539(n,i). - Ridouane Oudra, Apr 13 2023

A073491 Numbers having no prime gaps in their factorization.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 23, 24, 25, 27, 29, 30, 31, 32, 35, 36, 37, 41, 43, 45, 47, 48, 49, 53, 54, 59, 60, 61, 64, 67, 71, 72, 73, 75, 77, 79, 81, 83, 89, 90, 96, 97, 101, 103, 105, 107, 108, 109, 113, 120, 121, 125, 127, 128, 131, 135
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Comments

A073490(a(n)) = 0; subsequences are: A000040, A000961, A006094, A002110, A000142, A073485.
A137721(n) = number of terms not greater than n; A137794(a(n))=1; complement of A073492. - Reinhard Zumkeller, Feb 11 2008
Essentially the same as A066311. - R. J. Mathar, Sep 23 2008
The Heinz numbers of the partitions that have no gaps. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product_{j=1..r} (p_j-th prime) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). Example: (i) 18 (= 2*3*3) is in the sequence because it is the Heinz number of the partition [1,2,2]; (ii) 10 (= 2*5) is not in the sequence because it is the Heinz number of the partition [1,3]. - Emeric Deutsch, Oct 02 2015

Examples

			360 is a term, as 360 = 2*2*2*3*3*5 with consecutive prime factors.
		

Crossrefs

Programs

  • Haskell
    a073491 n = a073491_list !! (n-1)
    a073491_list = filter ((== 0) . a073490) [1..]
    -- Reinhard Zumkeller, Dec 20 2013
    
  • Mathematica
    ok[n_] := (p = FactorInteger[n][[All, 1]]; PrimePi[Last@p] - PrimePi[First@p] == Length[p] - 1); Select[Range[135], ok] (* Jean-François Alcover, Apr 29 2011 *)
    npgQ[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},f==Prime[Range[ PrimePi[ f[[1]]], PrimePi[f[[-1]]]]]]; Join[{1},Select[Range[2,200],npgQ]] (* Harvey P. Dale, Apr 12 2013 *)
  • PARI
    is(n)=my(f=factor(n)[,1]); for(i=2,#f,if(precprime(f[i]-1)>f[i-1], return(0))); 1 \\ Charles R Greathouse IV, Apr 28 2015

A268193 Triangle read by rows: T(n,k) (n>=1, k>=0) is the number of partitions of n which have k distinct parts i such that i+1 is also a part.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 3, 8, 2, 1, 8, 6, 1, 13, 7, 2, 15, 11, 4, 22, 15, 4, 1, 24, 24, 7, 1, 37, 26, 12, 2, 40, 42, 16, 3, 57, 50, 22, 6, 64, 72, 33, 6, 1, 89, 84, 46, 11, 1, 98, 122, 60, 15, 2, 135, 141, 82, 24, 3, 149, 198, 106, 32, 5, 199, 231, 144, 45, 8, 224, 309, 187, 61, 10, 1
Offset: 1

Views

Author

Emeric Deutsch, Feb 13 2016

Keywords

Comments

T(n,k) = number of partitions of n having k singleton parts other than the largest part. Example: T(5,1) = 3 because we have [4,1'], [3,2'], [2,2,1'] (the counted singletons are marked). These partitions are connected by conjugation to those in the definition.
From Gus Wiseman, Jul 10 2025: (Start)
Also the number of integer partitions of n with k maximal subsequences of consecutive parts not decreasing by 1 (anti-runs). For example, row n = 8 counts partitions with the following anti-runs:
((8)) ((3,3),(2)) ((3),(2,2),(1))
((4,4)) ((4),(3,1)) ((3),(2),(1,1,1))
((5,3)) ((5,2),(1))
((6,2)) ((4,2),(1,1))
((7,1)) ((2,2,2),(1,1))
((4,2,2)) ((2,2),(1,1,1,1))
((6,1,1)) ((2),(1,1,1,1,1,1))
((2,2,2,2))
((3,3,1,1))
((5,1,1,1))
((4,1,1,1,1))
((3,1,1,1,1,1))
((1,1,1,1,1,1,1,1))
(End)

Examples

			T(5,1) = 3 because we have [3,2], [2,2,1], and [2,1,1,1].
T(9,2) = 4 because we have [3,2',1,1,1,1'], [3,2,2',1,1'], [3,3,2',1'], and [4,3',2'] (the i's are marked).
Triangle starts:
  1;
  2;
  2,1;
  4,1;
  4,3;
  8,2,1;
  8,6,1;
From _Gus Wiseman_, Jul 11 2025: (Start)
Row n = 8 counts the following partitions by number of singleton parts other than the largest part:
  (8)                (5,3)        (4,3,1)
  (4,4)              (6,2)        (5,2,1)
  (4,2,2)            (7,1)
  (6,1,1)            (3,3,2)
  (2,2,2,2)          (3,2,2,1)
  (3,3,1,1)          (4,2,1,1)
  (5,1,1,1)          (3,2,1,1,1)
  (2,2,2,1,1)
  (4,1,1,1,1)
  (2,2,1,1,1,1)
  (3,1,1,1,1,1)
  (2,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1)
(End)
		

Crossrefs

Row sums are A000041.
Row lengths are A003056.
For distinct parts instead of anti-runs we have A116608.
Column k = 1 is A116931.
For runs instead of anti-runs we have A384881.
The strict case is A384905.
The corresponding rank statistic is A356228, non-strict version A384906.
The proper case is A385814, runs A385815.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Maple
    g := add(x^j*mul(1+t*x^i+x^(2*i)/(1-x^i), i = 1 .. j-1)/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 27)): for n from 0 to 25 do P[n] := sort(coeff(gser, x, n)) end do: for n to 25 do seq(coeff(P[n], t, k), k = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1, t or j>0)*
          `if`(t and j=1, x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, false)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 13 2016
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, t || j > 0]*If[t && j == 1, x, 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, False]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1!=#2+1&]]==k&]],{n,0,10},{k,0,n}] (* Delete zeros for A268193. Gus Wiseman, Jul 10 2025 *)

Formula

T(n,0) = A116931(n).
Sum_{k>=1} T(n, k) = A000041(n) (the partition numbers).
Sum_{k>=1} k*T(n,k) = A024786(n-1).
G.f.: G(t,x) = Sum_{j>=1} ((x^j/(1-x^j))*Product_{i=1..j-1} (1 + tx^i + x^{2i}/(1-x^i))).

A116674 Triangle read by rows: T(n,k) is the number of partitions of n into odd parts and having exactly k distinct parts (n>=1, k>=1).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 3, 1, 5, 3, 4, 1, 2, 7, 1, 2, 8, 2, 2, 10, 3, 2, 11, 5, 2, 13, 7, 4, 12, 11, 1, 19, 11, 1, 2, 18, 17, 1, 3, 20, 21, 2, 2, 22, 27, 3, 2, 25, 32, 5, 4, 24, 41, 7, 2, 30, 46, 11, 2, 31, 56, 15, 2, 36, 62, 22, 3, 33, 80, 25, 1, 2, 39, 87, 36, 1, 4, 38, 103, 45, 2, 2, 45
Offset: 1

Views

Author

Emeric Deutsch, Feb 22 2006

Keywords

Comments

Row n has floor(sqrt(n)) terms. Row sums yield A000009. T(n,1)=A001227(n) (n>=1). Sum(k*T(n,k),k>=1)=A038348(n-1) (n>=1).
Conjecture: Also the number of strict integer partitions of n with k maximal runs of consecutive parts decreasing by 1. - Gus Wiseman, Jun 24 2025

Examples

			From _Gus Wiseman_, Jun 24 2025: (Start)
Triangle begins:
   1:  1
   2:  1
   3:  2
   4:  1  1
   5:  2  1
   6:  2  2
   7:  2  3
   8:  1  5
   9:  3  4  1
  10:  2  7  1
  11:  2  8  2
  12:  2 10  3
  13:  2 11  5
  14:  2 13  7
  15:  4 12 11
  16:  1 19 11  1
  17:  2 18 17  1
  18:  3 20 21  2
  19:  2 22 27  3
  20:  2 25 32  5
Row n = 9 counts the following partitions into odd parts by number of distinct parts:
  (9)                  (7,1,1)          (5,3,1)
  (3,3,3)              (3,3,1,1,1)
  (1,1,1,1,1,1,1,1,1)  (5,1,1,1,1)
                       (3,1,1,1,1,1,1)
Row n = 9 counts the following strict partitions by number of maximal runs:
  (9)      (6,3)    (5,3,1)
  (5,4)    (7,2)
  (4,3,2)  (8,1)
           (6,2,1)
(End)
		

Crossrefs

Row sums are A000009, strict case of A000041.
Row lengths are A000196.
Leading terms are A001227.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length.
A152140 counts partitions into odd parts by length.
A268193 counts partitions by number of maximal anti-runs, strict A384905.
A384881 counts partitions by number of maximal runs.

Programs

  • Maple
    g:=product(1+t*x^(2*j-1)/(1-x^(2*j-1)),j=1..35): gser:=simplify(series(g,x=0,34)): for n from 1 to 29 do P[n]:=coeff(gser,x^n) od: for n from 1 to 29 do seq(coeff(P[n],t,j),j=1..floor(sqrt(n))) od; # yields sequence in triangular form
    # second Maple program:
    with(numtheory):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-2)*`if`(j=0, 1, x), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(
             b(n, iquo(n+1, 2)*2-1)):
    seq(T(n), n=1..30);  # Alois P. Heinz, Mar 08 2015
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[b[n-i*j, i-2]*If[j == 0, 1, x], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, Quotient[n+1, 2]*2-1]]; Table[T[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],OddQ[Times@@#]&&Length[Union[#]]==k&]],{n,1,12},{k,1,Floor[Sqrt[n]]}] (*  Gus Wiseman, Jun 24 2025 *)

Formula

G.f.: product(1+tx^(2j-1)/(1-x^(2j-1)), j=1..infinity).

A384884 Number of integer partitions of n with all distinct lengths of maximal gapless runs (decreasing by 0 or 1).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 13, 18, 25, 35, 46, 60, 79, 104, 131, 170, 215, 271, 342, 431, 535, 670, 830, 1019, 1258, 1547, 1881, 2298, 2787, 3359, 4061, 4890, 5849, 7010, 8361, 9942, 11825, 14021, 16558, 19561, 23057, 27084, 31821, 37312, 43627, 50999, 59500, 69267
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2025

Keywords

Examples

			The partition y = (6,6,4,3,3,2) has maximal gapless runs ((6,6),(4,3,3,2)), with lengths (2,4), so y is counted under a(24).
The a(1) = 1 through a(8) = 18 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (211)   (221)    (222)     (322)      (332)
                    (1111)  (311)    (321)     (331)      (422)
                            (2111)   (411)     (421)      (431)
                            (11111)  (2211)    (511)      (521)
                                     (3111)    (2221)     (611)
                                     (21111)   (3211)     (2222)
                                     (111111)  (4111)     (3221)
                                               (22111)    (4211)
                                               (31111)    (5111)
                                               (211111)   (22211)
                                               (1111111)  (32111)
                                                          (41111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

For subsets instead of strict partitions we have A384175.
The strict case is A384178, for anti-runs A384880.
For anti-runs we have A384885.
For equal instead of distinct lengths we have A384887.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A239455 counts Look-and-Say or section-sum partitions, ranks A351294 or A381432.
A355394 counts partitions without a neighborless part, singleton case A355393.
A356236 counts partitions with a neighborless part, singleton case A356235.
A356606 counts strict partitions without a neighborless part, complement A356607.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Length/@Split[#,#2>=#1-1&]&]],{n,0,15}]

A384889 Number of subsets of {1..n} with all equal lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 4, 8, 14, 23, 37, 59, 93, 146, 230, 365, 584, 940, 1517, 2450, 3959, 6404, 10373, 16822, 27298, 44297, 71843, 116429, 188550, 305200, 493930, 799422, 1294108, 2095291, 3392736, 5493168, 8892148, 14390372, 23282110, 37660759, 60914308, 98528312, 159386110
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2025

Keywords

Examples

			The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), with lengths (2,2,2), so is counted under a(12).
The a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {1,3}    {1,2}
                  {2,3}    {1,3}
                  {1,2,3}  {1,4}
                           {2,3}
                           {2,4}
                           {3,4}
                           {1,2,3}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For runs instead of anti-runs we have A243815, distinct A384175, complement A384176.
For distinct instead or equal lengths we have A384177, ranks A384879.
For partitions instead of subsets we have A384888.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A047966 counts uniform partitions (equal multiplicities), ranks A072774.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)=Vec(sum(i=1,(n+1)\2,1/(1-x^(2*i-1)/(1-x)^(i-1))-1,1-x+O(x*x^n))/(1-x)^2) \\ Christian Sievers, Jun 20 2025

Formula

G.f.: ( Sum_{i>=1} (1/(1-x^(2*i-1)/(1-x)^(i-1))-1) + 1-x ) / (1-x)^2. - Christian Sievers, Jun 21 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 20 2025

A384887 Number of integer partitions of n with all equal lengths of maximal gapless runs (decreasing by 0 or 1).

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 10, 14, 18, 21, 26, 35, 39, 46, 58, 68, 79, 97, 111, 131, 155, 177, 206, 246, 278, 318, 373, 423, 483, 563, 632, 722, 827, 931, 1058, 1209, 1354, 1528, 1736, 1951, 2188, 2475, 2762, 3097, 3488, 3886, 4342, 4876, 5414, 6038, 6741, 7482
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2025

Keywords

Examples

			The partition y = (6,5,5,5,3,3,2,1) has maximal gapless runs ((6,5,5,5),(3,3,2,1)), with lengths (4,4), so y is counted under a(30).
The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (211)   (221)    (51)      (61)       (62)
                    (1111)  (2111)   (222)     (322)      (71)
                            (11111)  (321)     (2221)     (332)
                                     (2211)    (3211)     (2222)
                                     (21111)   (22111)    (3221)
                                     (111111)  (211111)   (3311)
                                               (1111111)  (22211)
                                                          (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The strict case is A384886, distinct A384178.
For distinct instead of equal lengths we have A384884.
For anti-runs instead of runs we have A384888, distinct A384885.
For subsets instead of strict partitions we have A243815.
Without counting decreases by 0 we get A384904.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A355394 counts partitions without a neighborless part, singleton case A355393.
A356236 counts partitions with a neighborless part, singleton case A356235.
A356606 counts strict partitions without a neighborless part, complement A356607.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Length/@Split[#,#2>=#1-1&]&]],{n,0,15}]

A384885 Number of integer partitions of n with all distinct lengths of maximal anti-runs (decreasing by more than 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 6, 8, 9, 13, 15, 18, 22, 28, 31, 38, 45, 53, 62, 74, 86, 105, 123, 146, 171, 208, 242, 290, 340, 399, 469, 552, 639, 747, 862, 999, 1150, 1326, 1514, 1736, 1979, 2256, 2560, 2909, 3283, 3721, 4191, 4726, 5311, 5973, 6691, 7510, 8396, 9395
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2025

Keywords

Examples

			The partition y = (8,6,3,3,3,1) has maximal anti-runs ((8,6,3),(3),(3,1)), with lengths (3,1,2), so y is counted under a(24).
The partition z = (8,6,5,3,3,1) has maximal anti-runs ((8,6),(5,3),(3,1)), with lengths (2,2,2), so z is not counted under a(26).
The a(1) = 1 through a(9) = 9 partitions:
  (1)  (2)  (3)  (4)    (5)      (6)      (7)      (8)      (9)
                 (3,1)  (4,1)    (4,2)    (5,2)    (5,3)    (6,3)
                        (3,1,1)  (5,1)    (6,1)    (6,2)    (7,2)
                                 (4,1,1)  (3,3,1)  (7,1)    (8,1)
                                          (4,2,1)  (4,2,2)  (4,4,1)
                                          (5,1,1)  (4,3,1)  (5,2,2)
                                                   (5,2,1)  (5,3,1)
                                                   (6,1,1)  (6,2,1)
                                                            (7,1,1)
		

Crossrefs

For subsets instead of strict partitions we have A384177, for runs A384175.
The strict case is A384880.
For runs instead of anti-runs we have A384884, strict A384178.
For equal instead of distinct lengths we have A384888, for runs A384887.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A239455 counts Look-and-Say or section-sum partitions, ranks A351294 or A381432.
A355394 counts partitions without a neighborless part, singleton case A355393.
A356236 counts partitions with a neighborless part, singleton case A356235.
A356606 counts strict partitions without a neighborless part, complement A356607.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Length/@Split[#,#2<#1-1&]&]],{n,0,15}]

A384881 Triangle read by rows where T(n,k) is the number of integer partitions of n with k maximal runs of consecutive parts decreasing by 1.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 2, 2, 0, 1, 0, 2, 3, 3, 2, 0, 1, 0, 2, 5, 3, 2, 2, 0, 1, 0, 1, 8, 4, 4, 2, 2, 0, 1, 0, 3, 5, 10, 4, 3, 2, 2, 0, 1, 0, 2, 9, 9, 9, 5, 3, 2, 2, 0, 1, 0, 2, 11, 13, 9, 9, 4, 3, 2, 2, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 25 2025

Keywords

Examples

			The partition (5,4,2,1,1) has maximal runs ((5,4),(2,1),(1)) so is counted under T(13,3) = 23.
Row n = 9 counts the following partitions:
  9    63    333    6111    33111   411111   3111111   111111111
  54   72    441    22221   51111   2211111  21111111
  432  81    522    42111   222111
       621   531    321111
       3321  711
             3222
             4221
             4311
             5211
             32211
Triangle begins:
  1
  0  1
  0  1  1
  0  2  0  1
  0  1  3  0  1
  0  2  2  2  0  1
  0  2  3  3  2  0  1
  0  2  5  3  2  2  0  1
  0  1  8  4  4  2  2  0  1
  0  3  5 10  4  3  2  2  0  1
  0  2  9  9  9  5  3  2  2  0  1
  0  2 11 13  9  9  4  3  2  2  0  1
  0  2 13 15 17  8 10  4  3  2  2  0  1
  0  2 14 23 16 17  8  9  4  3  2  2  0  1
  0  2 16 26 26 19 16  9  9  4  3  2  2  0  1
  0  4 13 37 32 26 19 16  8  9  4  3  2  2  0  1
		

Crossrefs

Row sums are A000041.
Column k = 1 is A001227.
For distinct parts instead of maximal runs we have A116608.
The strict case appears to be A116674.
For anti-runs instead of runs we have A268193.
Partitions with distinct runs of this type are counted by A384882, gapless A384884.
For prime indices see A385213, A287170, A066205, A356229.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1==#2+1&]]==k&]],{n,0,10},{k,0,n}]
  • PARI
    tri(n) = {(n*(n+1)/2)}
    B_list(N) = {my(v = vector(N, i, 0)); v[1] = q*t; for(m=2,N, v[m] = t * (q^tri(m) + sum(i=1,m-1, q^tri(i) * v[m-i] * (q^((m-i)*(i-1))/(1 - q^(m-i)) - q^((m-i)*i) + O('q^(N-tri(i)+1)))))); v}
    A_qt(max_row) = {my(N = max_row+1, B = B_list(N), g = 1 + sum(m=1,N, B[m]/(1 - q^m)) + O('q^(N+1))); vector(N, n, Vecrev(polcoeff(g, n-1)))} \\ John Tyler Rascoe, Aug 18 2025

Formula

G.f.: 1 + Sum_{m>0} B(m,q,t)/(1 - q^m) where B(m,q,t) = t * (q^tri(m) + Sum_{i=1..m-1} q^tri(i) * B(m-i,q,t) * ((q^((m-i)*(i-1))/(1 - q^(m-i))) - q^((m-i)*i))) and tri(n) = A000217(n). - John Tyler Rascoe, Aug 18 2025
Showing 1-10 of 18 results. Next