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 28 results. Next

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

A001190 Wedderburn-Etherington numbers: unlabeled binary rooted trees (every node has outdegree 0 or 2) with n endpoints (and 2n-1 nodes in all).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 11, 23, 46, 98, 207, 451, 983, 2179, 4850, 10905, 24631, 56011, 127912, 293547, 676157, 1563372, 3626149, 8436379, 19680277, 46026618, 107890609, 253450711, 596572387, 1406818759, 3323236238, 7862958391, 18632325319, 44214569100, 105061603969
Offset: 0

Views

Author

Keywords

Comments

Also number of n-node binary rooted trees (every node has outdegree <= 2) where root has degree 0 (only for n=1) or 1.
a(n+1) is the number of rooted trees with n nodes where the outdegree of every node is <= 2, see example. These trees are obtained by removing the root of the trees in the comment above. - Joerg Arndt, Jun 29 2014
Number of interpretations of x^n (or number of ways to insert parentheses) when multiplication is commutative but not associative. E.g., a(4) = 2: x(x*x^2) and x^2*x^2. a(5) = 3: (x*x^2)x^2, x(x*x*x^2) and x(x^2*x^2). [If multiplication is non-commutative then the answer is A000108(n-1). - Jianing Song, Apr 29 2022]
Number of ways to place n stars in a single bound stable hierarchical multiple star system; i.e., taking only the configurations from A003214 where all stars are included in single outer parentheses. - Piet Hut, Nov 07 2003
Number of colorations of Kn (complete graph of order n) with n-1 colors such that no triangle is three-colored. Two edge-colorations C1 and C2 of G are isomorphic iff exists an automorphism f (isomorphism between G an G) such that: f sends same-colored edges of C1 on same-colored edges of C2 and f^(-1) sends same-colored edges of C2 on same-colored edges of C1. - Abraham Gutiérrez, Nov 12 2012
For n>1, a(n) is the number of (not necessarily distinct) unordered pairs of free unlabeled trees having a total of n nodes. See the first entry in formula section. - Geoffrey Critzer, Nov 09 2014
Named after the English mathematician Ivor Etherington (1908-1994) and the Scottish mathematician Joseph Wedderburn (1882-1948). - Amiram Eldar, May 29 2021

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 11*x^7 + 23*x^8 + 46*x^9 + 98*x^10 + ...
From _Joerg Arndt_, Jun 29 2014: (Start)
The a(6+1) = 11 rooted trees with 6 nodes as described in the comment are:
:           level sequence       outdegrees (dots for zeros)
:     1:  [ 0 1 2 3 4 5 ]    [ 1 1 1 1 1 . ]
:  O--o--o--o--o--o
:
:     2:  [ 0 1 2 3 4 4 ]    [ 1 1 1 2 . . ]
:  O--o--o--o--o
:           .--o
:
:     3:  [ 0 1 2 3 4 3 ]    [ 1 1 2 1 . . ]
:  O--o--o--o--o
:        .--o
:
:     4:  [ 0 1 2 3 4 2 ]    [ 1 2 1 1 . . ]
:  O--o--o--o--o
:     .--o
:
:     5:  [ 0 1 2 3 4 1 ]    [ 2 1 1 1 . . ]
:  O--o--o--o--o
:  .--o
:
:     6:  [ 0 1 2 3 3 2 ]    [ 1 2 2 . . . ]
:  O--o--o--o
:        .--o
:     .--o
:
:     7:  [ 0 1 2 3 3 1 ]    [ 2 1 2 . . . ]
:  O--o--o--o
:        .--o
:  .--o
:
:     8:  [ 0 1 2 3 2 3 ]    [ 1 2 1 . 1 . ]
:  O--o--o--o
:     .--o--o
:
:     9:  [ 0 1 2 3 2 1 ]    [ 2 2 1 . . . ]
:  O--o--o--o
:     .--o
:  .--o
:
:    10:  [ 0 1 2 3 1 2 ]    [ 2 1 1 . 1 . ]
:  O--o--o--o
:  .--o--o
:
:    11:  [ 0 1 2 2 1 2 ]    [ 2 2 . . 1 . ]
:  O--o--o
:     .--o
:  .--o--o
:
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 55.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 295-316.
  • A. Gutiérrez-Sánchez, Shen-colored tournaments, thesis, UNAM, 2012.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.52.
  • Richard P. Stanley, Catalan Numbers, Cambridge, 2015, p. 133.

Crossrefs

Column k=2 of A292085 and of A299038.
Column k=1 of A319539 and of A319541.

Programs

  • Maple
    A001190 := proc(n) option remember; local s,k; if n<=1 then RETURN(n); elif n <=3 then RETURN(1); else s := 0; if n mod 2 = 0 then s := A001190(n/2)*(A001190(n/2)+1)/2; for k from 1 to n/2-1 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); else for k from 1 to (n-1)/2 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); fi; fi; end;
    N := 40: G001190 := add(A001190(n)*x^n,n=0..N);
    spec := [S,{S=Union(Z,Prod(Z,Set(S,card=2)))},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
    # alternative Maple program:
    a:= proc(n) option remember; `if`(n<2, n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(a(n/2)))+add(a(i)*a(n-i), i=1..n/2))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Aug 28 2017
  • Mathematica
    terms = 35; A[] = 0; Do[A[x] = x + (1/2)*(A[x]^2 + A[x^2]) + O[x]^terms // Normal, terms]; CoefficientList[A[x], x] (* Jean-François Alcover, Jul 22 2011, updated Jan 10 2018 *)
    a[n_?OddQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, (n-1)/2}]; a[n_?EvenQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, n/2-1}] + (1/2)*a[n/2]*(1+a[n/2]); a[0]=0; a[1]=1; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jun 13 2012, after recurrence formula *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Nest[ 1 - Sqrt[1 - 2 x - (# /. x -> x^2)] &, 0, BitLength @ n], {x, 0, n}]]; (* Michael Somos, Apr 25 2013 *)
  • PARI
    {a(n) = local(A, m); if( n<0, 0, m=1; A = O(x); while( m<=n, m*=2; A = 1 - sqrt(1 - 2*x - subst(A, x, x^2))); polcoeff(A, n))}; /* Michael Somos, Sep 06 2003 */
    
  • PARI
    {a(n) = local(A); if( n<4, n>0, A = vector(n, i, 1); for( i=4, n, A[i] = sum( j=1, (i-1)\2, A[j] * A[i-j]) + if( i%2, 0, A[i/2] * (A[i/2] + 1)/2)); A[n])}; /* Michael Somos, Mar 25 2006 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A001190(n):
        if n <= 1: return n
        m = n//2 + n % 2
        return sum(A001190(i+1)*A001190(n-1-i) for i in range(m-1)) + (1 - n % 2)*A001190(m)*(A001190(m)+1)//2 # Chai Wah Wu, Jan 14 2022

Formula

G.f. satisfies A(x) = x + (1/2)*(A(x)^2 + A(x^2)) [de Bruijn and Klarner].
G.f. also satisfies A(x) = 1 - sqrt(1 - 2*x - A(x^2)). - Michael Somos, Sep 06 2003
a(2n-1) = a(1)a(2n-2) + a(2)a(2n-3) + ... + a(n-1)a(n), a(2n) = a(1)a(2n-1) + a(2)a(2n-2) + ... + a(n-1)a(n+1) + a(n)(a(n)+1)/2.
Given g.f. A(x), then B(x) = -1 + A(x) satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = (u^2 + v)^2 + 2*(v^2 + w). - Michael Somos, Oct 22 2006
The radius of convergence of the g.f. is A240943 = 1/A086317 ~ 0.4026975... - Jean-François Alcover, Jul 28 2014, after Steven R. Finch.
a(n) ~ A086318 * A086317^(n-1) / n^(3/2). - Vaclav Kotesovec, Apr 19 2016

A001832 Number of labeled connected bipartite graphs on n nodes.

Original entry on oeis.org

1, 1, 3, 19, 195, 3031, 67263, 2086099, 89224635, 5254054111, 426609529863, 47982981969979, 7507894696005795, 1641072554263066471, 502596525992239961103, 216218525837808950623459, 130887167385831881114006475, 111653218763166828863141636911
Offset: 1

Views

Author

Keywords

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 406.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A228861.
The unlabeled version is A005142.

Programs

  • Mathematica
    mx = 17; s = Sum[ Binomial[n, k] 2^(k (n - k)) x^n/n!, {n, 0, mx}, {k, 0, n}] ; Range[0, mx]! CoefficientList[ Series[ Log[s]/2, {x, 0, mx}], x] (* Geoffrey Critzer, May 10 2011 *)
  • PARI
    seq(n)=Vec(serlaplace(log(sum(k=0, n, exp(2^k*x + O(x*x^n))*x^k/k!))/2)) \\ Andrew Howroyd, Sep 26 2018

Formula

E.g.f.: log(A(x))/2 where A(x) is e.g.f. of A047863.
a(n) = A002031(n)/2, for n > 1. - Geoffrey Critzer, May 10 2011

Extensions

More terms from Vladeta Jovovic, Apr 12 2003

A000903 Number of inequivalent ways of placing n nonattacking rooks on n X n board up to rotations and reflections of the board.

Original entry on oeis.org

1, 1, 2, 7, 23, 115, 694, 5282, 46066, 456454, 4999004, 59916028, 778525516, 10897964660, 163461964024, 2615361578344, 44460982752488, 800296985768776, 15205638776753680, 304112757426239984, 6386367801916347184
Offset: 1

Views

Author

Keywords

Examples

			For n=4 the 7 solutions may be taken to be 1234,1243,1324,1423,1432,2143,2413.
		

References

  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. C. Read, personal communication.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Z. Stankova and J. West, A new class of Wilf-equivalent permutations, J. Algeb. Combin., 15 (2002), 271-290.

Crossrefs

Programs

  • Maple
    Maple programs for A000142, A037223, A122670, A001813, A000085, A000898, A000407, A000902, A000900, A000901, A000899, A000903
    P:=n->n!; # Gives A000142
    G:=proc(n) local k; k:=floor(n/2); k!*2^k; end; # Gives A037223, A000165
    R:=proc(n) local m; if n mod 4 = 2 or n mod 4 = 3 then RETURN(0); fi; m:=floor(n/4); (2*m)!/m!; end; # Gives A122670, A001813
    unprotect(D); D:=proc(n) option remember; if n <= 1 then 1 else D(n-1)+(n-1)*D(n-2); fi; end; # Gives A000085
    B:=proc(n) option remember; if n <= 1 then RETURN(1); fi; if n mod 2 = 1 then RETURN(B(n-1)); fi; 2*B(n-2) + (n-2)*B(n-4); end; # Gives A000898 (doubled up)
    rho:=n->R(n)/2; # Gives A000407, aerated
    beta:=n->B(n)/2; # Gives A000902, doubled up
    delta:=n->(D(n)-B(n))/2; # Gives A000900
    unprotect(gamma); gamma:=n-> if n <= 1 then RETURN(0) else (G(n)-B(n)-R(n))/4; fi; # Gives A000901, doubled up
    alpha:=n->P(n)/8-G(n)/8+B(n)/4-D(n)/4; # Gives A000899
    unprotect(sigma); sigma:=n-> if n <= 1 then RETURN(1); else P(n)/8+G(n)/8+R(n)/4+D(n)/4; fi; #Gives A000903
  • Mathematica
    c[n_] := Floor[n/2]! 2^Floor[n/2];
    r[n_] := If[Mod[n, 4] > 1, 0, m = Floor[n/4]; If[m == 0, 1, (2 m)!/m!]];
    d[0] = d[1] = 1; d[n_] := d[n] = (n - 1)d[n - 2] + d[n - 1];
    a[1] = 1; a[n_] := (n! + c[n] + 2 r[n] + 2 d[n])/8;
    Array[a, 21] (* Jean-François Alcover, Apr 06 2011, after Matthias Engelhardt, further improved by Robert G. Wilson v *)

Formula

If n>1 then a(n) = 1/8 * (F(n) + C(n) + 2 * R(n) + 2 * D(n)), where F(n) = A000142(n) [all solutions, i.e., factorials], C(n) = A037223(n) [central symmetric solutions], R(n) = A037224(n) [rotationally symmetric solutions] and D(n) = A000085(n) [symmetric solutions by reflection at a diagonal]. - Matthias Engelhardt, Apr 05 2000
For asymptotics see the Robinson paper.

Extensions

More terms from David W. Wilson, Jul 13 2003

A000672 Number of 3-valent trees (= boron trees or binary trees) with n nodes.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 6, 11, 18, 37, 66, 135, 265, 552, 1132, 2410, 5098, 11020, 23846, 52233, 114796, 254371, 565734, 1265579, 2841632, 6408674, 14502229, 32935002, 75021750, 171404424, 392658842, 901842517, 2076217086, 4790669518, 11077270335
Offset: 0

Views

Author

Keywords

Comments

This can be described in 2 ways: (a) Trees with n nodes of valency <= 3, for n = 0,1,2,3,... (b) Trees with t = 2n+2 nodes of valency either 1 or 3 (implying that there are n nodes of valency 3 - the boron atoms - and n+2 nodes of valency 1 - the hydrogen atoms), for t = 2,4,6,8,...
Essentially the same sequences arises from studying the number of unrooted, unlabeled binary tree topologies with n leaves (see A129860). - Steven Kelk, Jul 22 2016

Examples

			The 4 trees with 6 nodes are:
._._._._._. . ._._._._. . ._._._._. . ._._._.
. . . . . . . . | . . . . . . | . . . . | |
G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 4*x^6 + 6*x^7 + 11*x^8 + ...
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • P. J. Cameron, Oligomorphic Permutation Groups, Cambridge; see Fig. 2 p. 35.
  • A. Cayley, On the analytical forms called trees, with application to the theory of chemical combinations, Reports British Assoc. Advance. Sci. 45 (1875), 257-305 = Math. Papers, Vol. 9, 427-460 (see p. 451).
  • Joseph Felsenstein, Inferring Phylogenies. Sinauer Associates, Inc., 2004, page 33. Note that at least the first two editions give an incorrect version of this sequence.
  • R. C. Read, personal communication.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k = 3 of A144528.
Cf. A001190(n+1) (rooted trees).

Programs

  • Mathematica
    (* c = A001190 *) c[n_?OddQ] := c[n] = Sum[c[k]*c[n-k], {k, 1, (n-1)/2}]; c[n_?EvenQ] := c[n] = (1/2)*c[n/2]*(c[n/2] + 1) + Sum[c[k]*c[n-k], {k, 1, n/2-1}]; c[0] = 0; c[1] = 1; b[x_] := If[IntegerQ[x], c[x+1], 0]; a[0] = a[1] = a[2] = 1; a[n_] := b[n/2] - (1/3)*(b[(n-1)/3]-1)*b[(n-1)/3]*(b[(n-1)/3] + 1) + 2*b[n] - b[n+1] - Sum[(1/2)*(b[i]-1)*b[i]*b[-2*i + n - 1], {i, 1, (n-2)/2}] + Sum[b[i]*Sum[b[j]*b[n-i-j-1], {j, i, (1/2)*(n-i-1)}], {i, 1, (n-1)/3}]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 19 2015 *)
    n = 50; (* algorithm from Rains and Sloane *)
    S2[f_,h_,x_] := f[h,x]^2/2 + f[h,x^2]/2;
    S3[f_,h_,x_] := f[h,x]^3/6 + f[h,x] f[h,x^2]/2 + f[h,x^3]/3;
    T[-1,z_] := 1;  T[h_,z_] := T[h,z] = Table[z^k, {k,0,n}].Take[CoefficientList[z^(n+1) + 1 + S2[T,h-1,z]z, z], n+1];
    Sum[Take[CoefficientList[z^(n+1) + S3[T,h-1,z]z - S3[T,h-2,z]z - (T[h-1,z] - T[h-2,z]) (T[h-1,z]-1),z], n+1], {h,1,n/2}] + PadRight[{1,1}, n+1] + Sum[Take[CoefficientList[z^(n+1) + (T[h,z] - T[h-1,z])^2/2 + (T[h,z^2] - T[h-1,z^2])/2, z],n+1], {h,0,n/2}] (* Robert A. Russell, Sep 15 2018 *)
    n = 60; c[n_?OddQ] := c[n] = Sum[c[k]*c[n-k], {k,1,(n-1)/2}];
    c[n_?EvenQ] := c[n] = (1/2)*c[n/2]*(c[n/2] + 1) + Sum[c[k]*c[n-k],
      {k,1,n/2-1}]; c[0] = 0; c[1] = 1; (* as in program 1 above *)
    gf[x_] := Sum[c[i+1] x^i, {i,0,n}]; (* g.f. for A001190(n+1) *)
    ci[x_] := SymmetricGroupIndex[3, x] /. x[i_] -> gf[x^i];
    CoefficientList[Normal[Series[gf[x] - (gf[x]^2 - gf[x^2])/2 +
    x ci[x], {x,0,n}]], x] (* Robert A. Russell, Jan 17 2023 *)

Formula

Rains and Sloane give a g.f.
a(0)=a(1)=a(2)=1, a(n) = 2*b(n+1) - b(n+2) + b((n+1)/2) - 2*C(1+b(n/3), 3) - Sum_{i=1..[(n-1)/2]} C(b(i), 2)*b(n-2*i) + Sum_{i=1..[n/3]} b(i) Sum_{j=i..[(n-i)/2]} b(j)*b(n-i-j), where b(x) = A001190(x+1) if x is an integer, otherwise 0 (Cyvin et al.) [Index of A001190 shifted by R. J. Mathar, Mar 08 2010]
a(n) = A000673(n) + A000675(n).
a(n) ~ c * d^n / n^(5/2), where d = A086317 = 2.4832535361726368585622885181... and c = 1.2551088797592580080398489829149157375... . - Vaclav Kotesovec, Apr 19 2016
G.f.: B(x) - cycle_index(S2,-B(x)) + x * cycle_index(S3,B(x)) = B(x) - (B(x)^2 - B(x^2)) / 2 + x * (B(x)^3 + 3*B(x) B(x^2) + 2*B(x^3)) / 6, where B(x) = 1 + x * cycle_index(S2,B(x)) = 1 + x * (B(x)^2 + B(x^2)) / 2 is the generating function for A001190(n+1). - Robert A. Russell, Jan 17 2023

A111636 Triangle read by rows: T(n,k) (0<=k<=n) is the number of labeled graphs having k blue nodes and n-k green ones and only nodes of different colors can be joined by an edge.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 12, 12, 1, 1, 32, 96, 32, 1, 1, 80, 640, 640, 80, 1, 1, 192, 3840, 10240, 3840, 192, 1, 1, 448, 21504, 143360, 143360, 21504, 448, 1, 1, 1024, 114688, 1835008, 4587520, 1835008, 114688, 1024, 1, 1, 2304, 589824, 22020096, 132120576, 132120576, 22020096, 589824, 2304, 1
Offset: 0

Views

Author

Emeric Deutsch, Aug 09 2005

Keywords

Comments

Row sums yield A047863. T(2*n,n) = A111637(n). T(n,1) = A001787(n).

Examples

			T(2,1)=4 because we have B G, B--G, G B and G--B, where B (G) stands for a blue (green) node and -- denotes an edge.
Triangle starts:
  1;
  1,  1;
  1,  4,  1;
  1, 12, 12,  1;
  1, 32, 96, 32, 1;
  ...
		

References

  • H. S. Wilf, Generatingfunctionology, 2nd edn., Academic Press, NY, 1994, p. 88, Eq. 3.11.2.

Crossrefs

Cf. A134530 (matrix log), A134531.
Cf. A000684, A011266, A038845, A140802, A224069 (matrix inverse).

Programs

  • Maple
    T:=(n,k)->binomial(n,k)*2^(k*(n-k)): for n from 0 to 9 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    nn=6;f[x_,y_]:=Sum[Exp[x 2^n](y x)^n/n!,{n,0,nn}];Range[0,nn]!CoefficientList[Series[f[x,y],{x,0,nn}],{x,y}]//Grid (* Geoffrey Critzer, Sep 07 2013 *)

Formula

T(n, k)=2^[k(n-k)]*C(n, k).
Matrix log yields triangle A134530, where A134530(n,k) = A134531(n-k)*(2^k)^(n-k)*C(n,k). - Paul D. Hanna, Nov 11 2007
From Peter Bala, Aug 13 2012: (Start)
Let f(n) = n!*2^binomial(n,2) = A011266(n). Then T(n,k) = f(n)/(f(k)*f(n-k)).
E.g.f.: Sum_{n >= 0} exp(2^n*t*x)*x^n/n! = 1 + (1+t)*x + (1+4*t+t^2)*x^2/2! + ....
O.g.f.: Sum_{n >= 0} x^n/(1-2^n*t*x)^(n+1) = 1 + (1+t)*x + (1+4*t+t^2)*x^2 + .... O.g.f. for column k: 1/(1-2^k*x)^(k+1).
Recurrence equation: T(n,k) = 2^k*T(n-1,k) + 2^(n-k)*T(n-1,k-1).
Column k = 2: A038845. Column k = 3: A140802. Sum_{k = 0..n} k*T(n,k) = n*A000684(n). (End)
From Peter Bala, Apr 09 2013: (Start)
Let E(x) = Sum_{n >= 0} x^n/(n!*2^C(n,2)) = 1 + x + x^2/(2!*2) + x^3/(3!*2^3) + .... Then a generating function for this sequence is E(z)*E(x*z) = 1 + (1 + x)*z + (1 + 4*x + x^2)*z^2/(2!*2) + (1 + 12*x + 12*x^2 + x^3)*z^3/(3!*2^3) + .... Cf. Pascal's triangle A007318 with an e.g.f. of exp(z)*exp(x*z).
This is a generalized Riordan array (E(x), x) with respect to the sequence n!*2^C(n,2), as defined by Wang and Wang.
The n-th power of this triangle has a generating function E(z)^n*E(x*z). See A224069 for the inverse array (n = -1).
The n-th row is a log-concave sequence and hence unimodal.
The row polynomials satisfy the recurrence equation R(n+1,x) = 2^n*x*R(n,x/2) + R(n,2*x) with R(0,x) = 1, as well as R'(n,2*x) = n*2^(n-1)*R(n-1,x) (the ' denotes differentiation w.r.t. x). The row polynomials appear to have only real zeros.
Sum_{k = 0..n} (-1)^k*T(2*n+1,k) = 0;
Sum_{k = 0..n} (-1)^k*2^k*T(2*n,k) = 0;
Sum_{k = 0..n} 2^k*T(n,k) = A000684(n). (End)
T(n,k+1) = Product_{i=0..k} (T(n-i,1)/T(i+1,1)) for 0 <= k < n. - Werner Schulte, Nov 13 2018

A361950 Array read by antidiagonals: T(n,k) = n! * Sum_{s} 2^(Sum_{i=1..k-1} s(i)*s(i+1))/(Product_{i=1..k} s(i)!) where the sum is over all nonnegative compositions s of n into k parts.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 6, 1, 0, 1, 4, 13, 26, 1, 0, 1, 5, 22, 81, 162, 1, 0, 1, 6, 33, 166, 721, 1442, 1, 0, 1, 7, 46, 287, 1726, 9153, 18306, 1, 0, 1, 8, 61, 450, 3309, 24814, 165313, 330626, 1, 0, 1, 9, 78, 661, 5650, 50975, 494902, 4244481, 8488962, 1, 0
Offset: 0

Views

Author

Andrew Howroyd, Mar 31 2023

Keywords

Comments

T(n,k) corresponds to c(k,n) in the Klarner reference. This is an intermediate step in the computation of the number of labeled weakly graded (ranked) posets. The number of elements in the poset is n and the rank k.

Examples

			Array begins:
======================================================
n/k| 0 1      2       3        4        5        6 ...
---+--------------------------------------------------
0  | 1 1      1       1        1        1        1 ...
1  | 0 1      2       3        4        5        6 ...
2  | 0 1      6      13       22       33       46 ...
3  | 0 1     26      81      166      287      450 ...
4  | 0 1    162     721     1726     3309     5650 ...
5  | 0 1   1442    9153    24814    50975    91866 ...
6  | 0 1  18306  165313   494902  1058493  1957066 ...
7  | 0 1 330626 4244481 13729846 29885567 55363650 ...
  ...
T(3,2) = 26: the nonnegative integer compositions of 3 with 2 parts are (0,3), (1,2), (2,1), (3,0). These contribute, respectively 2^0*3!/(0!*3!) = 1, 2^2*3!/(1!*2!) = 12, 2^2*3!/(2!*1!) = 12, 2^0*3!/(0!*3!) = 1, so T(3,2) = 1 + 12 + 12 + 1 = 26.
		

Crossrefs

Rows 0..2 are A000012, A000027, A028872(n+1).
The unlabeled version is A361952.
Cf. A361951.

Programs

  • PARI
    S(M)={matrix(#M, #M, i, j, sum(k=0, i-j, 2^((j-1)*k)*M[i-j+1,k+1])/(j-1)! )}
    C(n, m=n)={my(M=matrix(n+1, n+1), c=vector(m+1), A=O(x*x^n)); M[1, 1]=1; c[1]=1+A; for(h=1, m, M=S(M); c[h+1]=sum(i=0, n, vecsum(M[i+1, ])*x^i, A)); c}
    R(n)={Mat([Col(serlaplace(p)) | p<-C(n)])}
    { my(A=R(6)); for(i=1, #A, print(A[i,])) }

A000671 Number of boron trees with n nodes, i.e. n-node rooted trees with degree <= 3 at root and out-degree <= 2 elsewhere.

Original entry on oeis.org

0, 1, 1, 2, 4, 7, 14, 29, 60, 127, 275, 598, 1320, 2936, 6584, 14858, 33744, 76999, 176557, 406456, 939241, 2177573, 5064150, 11809632, 27610937, 64705623, 151966597, 357623905, 843176524, 1991439229, 4711115672, 11162025770, 26484061667, 62923251955
Offset: 0

Views

Author

Keywords

Comments

The subsequence of primes begins: 2, 7, 29, 127, 176557, 2177573, 151966597.

References

  • A. Cayley, On the analytical forms called trees, with application to the theory of chemical combinations, Reports British Assoc. Advance. Sci. 45 (1875), 257-305 = Math. Papers, Vol. 9, 427-460 (see p. 450).
  • R. C. Read, personal communication.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    N := 40: t1 := G001190/x: G000671 := series(x*(1/3!)*(t1^3+3*subs(x=x^2,t1)*t1+2*subs(x=x^3,t1)), x, N); A000671 := n->coeff(G000671,x,n);
    CI2 := proc(f) (1/2)*(f^2+subs(x=x^2,f)); end; CI3 := proc(f) (1/6)*(f^3+3*subs(x=x^2,f)*f+2*subs(x=x^3,f)); end;
    N := 40: B0 := series(1 + x,x,N): G000671 := series(x*(CI3(B0) + CI3(G036656) + CI3(G036657) + CI2(B0)*(G036656 + G036657) + CI2(G036656)*(G036657 + B0) + CI2(G036657)*(B0 + G036656) + B0*G036656*G036657),x,N); A036658 := n->coeff(G036658,x,n);
  • Mathematica
    terms = 32; (* B = g.f. for A001190 *) B[] = 0; Do[B[x] = x + (1/2)*(B[x]^2 + B[x^2]) + O[x]^terms // Normal, terms];
    f[x_] = B[x]/x;
    A[x_] = x*(1/3!)*(f[x]^3 + 3*f[x^2]*f[x] + 2*f[x^3]) + O[x]^terms;
    CoefficientList[A[x], x] (* Jean-François Alcover, May 29 2012, from first g.f., updated Jan 10 2018 *)

Formula

G.f.: A(x) = x*(1/3!)*(f^3+3*subs(x=x^2, f)*f+2*subs(x=x^3, f)), where f = G001190(x)/x, G001190 = g.f. for A001190.
a(n) = A001190(n) + A036657(n) + A036658(n).
Another g.f.: let B0(x) = 1+x, G036656(x) = g.f. for A036656, G036657(x) = g.f. for A036657.
Then g.f.: x*(cycle_index(S3, B0)+cycle_index(S3, G036656)+cycle_index(S3, G036657)+cycle_index(S2, B0)*(G036656+G036657)+cycle_index(S2, G036656)*(G036657+B0)+cycle_index(S2, G036657)*(B0+G036656)+B0*G036656*G036657), where cycle_index(Sk, f) means apply the cycle index for the symmetric group S_k to f(x).
E.g., cycle_index(S2, f) = (1/2!)*(f^2+subs(x=x^2, f), cycle_index(S3, f) = (1/3!)*(f^3+3*subs(x=x^2, f)*f+2*subs(x=x^3, f)).

A006202 Number of colorings of labeled graphs on n nodes using exactly 4 colors, divided by 4!*2^6.

Original entry on oeis.org

0, 0, 0, 1, 80, 7040, 878080, 169967616, 53247344640, 27580935700480, 23884321532149760, 34771166607668412416, 85316631064301031915520, 353171748158258855521812480, 2467057266045387831319241687040, 29078599995993904385498084987109376
Offset: 1

Views

Author

Keywords

Comments

Equals 1/1536*A224068. - Peter Bala, Apr 12 2013

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 18, col. 4 of Table 1.5.1 (divided by 64).
  • R. C. Read, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A058875.

Programs

  • Mathematica
    maxn = 16;
    t[, 1] = 1; t[n, k_] := t[n, k] = Sum[Binomial[n, j]*2^(j*(n - j))*t[j, k - 1]/k, {j, 1, n - 1}];
    a[n_] := t[n, 4]/64;
    Array[a, maxn]
  • PARI
    seq(n)={Vec(serconvol(sum(j=1, n, x^j*j!*2^binomial(j,2)) + O(x*x^n), (sum(j=1, n, x^j/(j!*2^binomial(j,2))) + O(x*x^n))^4)/1536, -n)} \\ Andrew Howroyd, Nov 30 2018

A001827 Related to graded partially ordered sets.

Original entry on oeis.org

1, 4, 22, 166, 1726, 24814, 494902, 13729846, 531077086, 28697950174, 2170176736102, 230007989092006, 34211282155446286, 7149766552058591374, 2101690590380890192342, 869808621195903097079446, 507261036269544624540347326
Offset: 0

Views

Author

Keywords

Comments

Corresponds to the numbers c(4,n) in the Klarner paper. - Sean A. Irvine, Sep 24 2015

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=4 of A361950.

Formula

a(n) = Sum_{p+q+r+s=n} (n!/p!q!r!s!) 2^(pq+qr+rs) where (p,q,r,s) is any nonnegative composition of n. - Sean A. Irvine, Sep 24 2015

Extensions

More terms from Sean A. Irvine, Sep 24 2015
Showing 1-10 of 28 results. Next