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

A036239 Number of 2-element intersecting families of an n-element set; number of 2-way interactions when 2 subsets of power set on {1..n} are chosen at random.

Original entry on oeis.org

0, 2, 15, 80, 375, 1652, 7035, 29360, 120975, 494252, 2007555, 8120840, 32753175, 131818052, 529680075, 2125927520, 8525298975, 34165897052, 136857560595, 548011897400, 2193792030375, 8780400395252, 35137296305115, 140596265198480
Offset: 1

Views

Author

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are intersecting but for which x is not a subset of y and y is not a subset of x, or 1) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - Ross La Haye, Jan 10 2008
Graph theory formulation. Let P(A) be the power set of an n-element set A. Then a(n) = the number of edges in the intersection graph G of P(A). The vertices of G are the elements of P(A) and the edges of G are the pairs of elements {x,y} of P(A) such that x and y are intersecting (and x <> y). - Ross La Haye, Dec 23 2017

References

  • W. W. Kokko, "Interactions", manuscript, 1983.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10,-35,50,-24},{0,2,15,80},40] (* or *) With[{c=1/2!}, Table[ c(4^n-3^n-2^n+1),{n,40}]] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n)=(4^n-3^n-2^n+1)/2 \\ Charles R Greathouse IV, Jul 25 2011
  • Sage
    [(4^n - 2^n)/2-(3^n - 1)/2 for n in range(1,24)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = (1/2) * (4^n - 3^n - 2^n + 1).
a(n) = 3*Stirling2(n+1,4) + 2*Stirling2(n+1,3). - Ross La Haye, Jan 10 2008
a(n) = A006516(n) - A003462(n). - Zerinvary Lajos, Jun 05 2009
From Harvey P. Dale, May 11 2011: (Start)
a(n) = 10*a(n-1) - 35*a(n-2) + 50*a(n-3) - 24*a(n-4); a(0)=0, a(1)=2, a(2)=15, a(3)=80.
G.f.: x^2*(2-5*x)/(1 - 10*x + 35*x^2 - 50*x^3 + 24*x^4). (End)
E.g.f.: exp(x)*(exp(x) - 1)^2*(exp(x) + 1)/2. - Stefano Spezia, Jun 26 2022

A056450 a(n) = (3*2^n - (-2)^n)/2.

Original entry on oeis.org

1, 4, 4, 16, 16, 64, 64, 256, 256, 1024, 1024, 4096, 4096, 16384, 16384, 65536, 65536, 262144, 262144, 1048576, 1048576, 4194304, 4194304, 16777216, 16777216, 67108864, 67108864, 268435456, 268435456, 1073741824, 1073741824, 4294967296
Offset: 0

Views

Author

Keywords

Comments

Number of palindromes of length n using a maximum of four different symbols.
Number of achiral rows of n colors using up to four colors. - Robert A. Russell, Nov 09 2018
Interleaving of A000302 and 4*A000302.
Unsigned version of A141125.
Binomial transform is A164907. Second binomial transform is A164908. Third binomial transform is A057651. Fourth binomial transform is A016129.

Examples

			At length n=1 there are a(1)=4 palindromes, A, B, C, D.
At length n=2, there are a(2)=4 palindromes, AA, BB, CC, DD.
At length n=3, there are a(3)=16 palindromes, AAA, BBB, CCC, DDD, ABA, BAB, ... , CDC, DCD.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Column k=4 of A321391.
Cf. A016116.
Essentially the same as A213173.
Cf. A000302 (oriented), A032121 (unoriented), A032087(n>1) (chiral).

Programs

  • Magma
    [ (3*2^n-(-2)^n)/2: n in [0..31] ];
    
  • Magma
    [4^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
    
  • Mathematica
    Table[4^Ceiling[n/2], {n,0,40}] (* or *)
    CoefficientList[Series[(1 + 4 x)/((1 + 2 x) (1 - 2 x)), {x, 0, 31}], x] (* or *)
    LinearRecurrence[{0, 4}, {1, 4}, 40] (* Robert A. Russell, Nov 07 2018 *)
  • PARI
    a(n)=4^((n+1)\2) \\ Charles R Greathouse IV, Apr 08 2012
    
  • PARI
    a(n)=(3*2^n-(-2)^n)/2 \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = 4^floor((n+1)/2).
a(n) = 4*a(n-2) for n > 1; a(0) = 1, a(1) = 4.
G.f.: (1+4*x) / (1-4*x^2). - R. J. Mathar, Jan 19 2011 [Adapted to offset 0 by Robert A. Russell, Nov 07 2018]
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = 4*abs(A164111(n-1)). - R. J. Mathar, Jan 19 2011
a(n) = C(4,0)*A000007(n) + C(4,1)*A057427(n) + C(4,2)*A056453(n) + C(4,3)*A056454(n) + C(4,4)*A056455(n). - Robert A. Russell, Nov 08 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 07 2018
Edited by N. J. A. Sloane, Sep 29 2019

A071951 Triangle of Legendre-Stirling numbers of the second kind T(n,j), n >= 1, 1 <= j <= n, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 8, 1, 8, 52, 20, 1, 16, 320, 292, 40, 1, 32, 1936, 3824, 1092, 70, 1, 64, 11648, 47824, 25664, 3192, 112, 1, 128, 69952, 585536, 561104, 121424, 7896, 168, 1, 256, 419840, 7096384, 11807616, 4203824, 453056, 17304, 240, 1, 512, 2519296, 85576448, 243248704, 137922336, 23232176, 1422080, 34584, 330, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 16 2002

Keywords

Comments

Removing a factor of 2^m from the m-th subdiagonal (the main diagonal corresponds to m = 0) gives the triangle A080248. - Peter Bala, Oct 15 2023

Examples

			The triangle begins:
n\j   1      2       3        4       5      6     7   8 9 ...
1:    1
2:    2      1
3:    4      8       1
4:    8     52      20        1
5:   16    320     292       40       1
6:   32   1936    3824     1092      70      1
7:   64  11648   47824    25664    3192    112     1
8:  128  69952  585536   561104  121424   7896   168   1
9:  256 419840 7096384 11807616 4203824 453056 17304 240 1
...
Row 10: 512 2519296 85576448 243248704 137922336 23232176 1422080 34584 330 1. Reformatted by _Wolfdieter Lang_, Apr 10 2013
		

Crossrefs

Diagonals give A007290, A000079, A016129, A016309.
The column sequences are A000079 (powers of 2), A016129, A016309, A071952, A089274, A089277.

Programs

  • Magma
    [[(&+[(-1)^(r+j)*(2*r+1)*(r^2+r)^n/(Factorial(r+j+1)*Factorial(j-r)): r in [1..j]]): j in [1..n]]: n in [1..12]]; // G. C. Greubel, Mar 16 2019
    
  • Maple
    N:= 20: # to get the first N rows, flattened
    for j from 1 to N do S[j]:= series(x^j/mul(1-r*(r+1)*x, r=1..j), x, N+1) od:
    seq(seq(coeff(S[j],x,i),j=1..i),i=1..N); # Robert Israel, Dec 03 2015
    # alternative
    A071951 := proc(n,k)
        option remember;
        if k =0 then
            if n = 0 then
                1;
            else
                0;
            end if;
        elif n = 0 then
            if k =0 then
                1;
            else
                0;
            end if;
        else
            procname(n-1,k-1)+k*(k+1)*procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Jun 30 2018
  • Mathematica
    Flatten[ Table[ Sum[(-1)^{r + j}(2r + 1)(r^2 + r)^n/((r + j + 1)!(j - r)!), {r, j}], {n, 10}, {j, n}]]
  • PARI
    {T(n, k) = sum( i=0, k, (-1)^(i+k) * (2*i + 1) * (i*i + i)^n / (k-i)! / (k+i+1)! )} /* Michael Somos, Feb 25 2012 */
    
  • Sage
    [[sum( (-1)^(r+j)*(2*r+1)*(r^2+r)^n/(factorial(r+j+1)*factorial(j-r)) for r in (1..j)) for j in (1..n)] for n in (1..12)] # G. C. Greubel, Mar 16 2019

Formula

T(n, j) = Sum_{r=1..j} (-1)^(r+j)*(2*r+1)*(r^2+r)^n/((r+j+1)!*(j-r)!).
G.f. for j-th column (without leading zeros): 1/Product_{r=1..j} (1 - r*(r+1)*x), j >= 1. From eq.(4.5) of the Everitt et al. paper.
A135921(n+1) = row sums. - Michael Somos, Feb 25 2012
Sum_{n=j..m} binomial(m,n)*T(n,j)*4^(n-j) = A160562(m,j) for 1 <= j <= m. - Werner Schulte, Dec 03 2015

A078739 Triangle of generalized Stirling numbers S_{2,2}(n,k) read by rows (n>=1, 2<=k<=2n).

Original entry on oeis.org

1, 2, 4, 1, 4, 32, 38, 12, 1, 8, 208, 652, 576, 188, 24, 1, 16, 1280, 9080, 16944, 12052, 3840, 580, 40, 1, 32, 7744, 116656, 412800, 540080, 322848, 98292, 16000, 1390, 60, 1, 64, 46592, 1446368, 9196992, 20447056, 20453376, 10564304, 3047520, 511392, 50400
Offset: 1

Views

Author

N. J. A. Sloane, Dec 21 2002

Keywords

Comments

A generalization of the Stirling2 numbers S_{1,1} from A008277.
The g.f. for column k=2*K is (x^K)*pe(K,x)*d(k,x) and for k=2*K+1 it is (x^K)*po(K,x)*2*(K+1)*K*d(k,x), K>= 1, with d(k,x) := 1/product(1-p*(p-1)*x,p=2..k) and the row polynomials pe(n,x) := sum(A089275(n,m)*x^m,m=0..n-1) and po(n,x) := sum(A089276(n,m)*x^m,m=0..n-1). - Wolfdieter Lang, Nov 07 2003
The formula for the k-th column sequence is given in A089511.
Codara et al., show that T(n,k) gives the number of k-colorings of the graph nK_2 (the disjoint union of n copies of the complete graph K_2). An example is given below. - Peter Bala, Aug 15 2013

Examples

			From _Peter Bala_, Aug 15 2013: (Start)
The table begins
n\k | 2    3    4    5    6   7   8
= = = = = = = = = = = = = = = = = =
  1 | 1
  2 | 2    4    1
  3 | 4   32   38   12    1
  4 | 8  208  652  576  188  24   1
...
Graph coloring interpretation of T(2,3) = 4: The graph 2K_2 is 2 copies of K_2, the complete graph on 2 vertices:
o---o  o---o
a   b  c   d
The four 3-colorings of 2K_2 are ac|b|d, ad|b|c, bc|a|d and bd|a|c. (End)
		

Crossrefs

Row sums give A020556. Triangle S_{1, 1} = A008277, S_{2, 1} = A008297 (ignoring signs), S_{3, 1} = A035342, S_{3, 2} = A078740, S_{3, 3} = A078741. A090214 (S_{4,4}).
The column sequences are A000079(n-1)(powers of 2), 4*A016129(n-2), A089271, 12*A089272, A089273, etc.
Main diagonal is A217900.
Cf. A071951 (Legendre-Stirling triangle).

Programs

  • Maple
    # Note that the function implements the full triangle because it can be
    # much better reused and referenced in this form.
    A078739 := proc(n,k) local r;
    add((-1)^(n-r)*binomial(n,r)*combinat[stirling2](n+r,k),r=0..n) end:
    # Displays the truncated triangle from the definition:
    seq(print(seq(A078739(n,k),k=2..2*n)),n=1..6); # Peter Luschny, Mar 25 2011
  • Mathematica
    t[n_, k_] := Sum[(-1)^(n-r)*Binomial[n, r]*StirlingS2[n+r, k], {r, 0, n}]; Table[t[n, k], {n, 1, 7}, {k, 2, 2*n}] // Flatten (* Jean-François Alcover, Apr 11 2013, after Peter Luschny *)

Formula

a(n, k) = sum(binomial(k-2+p, p)*A008279(2, p)*a(n-1, k-2+p), p=0..2) if 2 <= k <= 2*n for n>=1, a(1, 2)=1; else 0. Here A008279(2, p) gives the third row (k=2) of the augmented falling factorial triangle: [1, 2, 2] for p=0, 1, 2. From eq.(21) with r=2 of the Blasiak et al. paper.
a(n, k) = (((-1)^k)/k!)*sum(((-1)^p)*binomial(k, p)*A008279(p, 2)^n, p=2..k) for 2 <= k <= 2*n, n>=1. From eq.(19) with r=2 of the Blasiak et al. paper.
a(n, k) = sum(A071951(n, j)*A089503(j, 2*j-k+1), j=ceiling(k/2)..min(n, k-1)), 1<=n, 2<=k<=2n; relation to Legendre-Stirling triangle. Wolfdieter Lang, Dec 01 2003
a(n, k) = A122193(n,k)*2^n/k! - Peter Luschny, Mar 25 2011
E^n = sum_{k=2}^(2n) a(n,k)*x^k*D^k where D is the operator d/dx, and E the operator x^2d^2/dx^2.
The row polynomials R(n,x) are given by the Dobinski-type formula R(n,x) = exp(-x)*sum {k = 0..inf} (k*(k-1))^n*x^k/k!. - Peter Bala, Aug 15 2013

Extensions

More terms from Wolfdieter Lang, Nov 07 2003

A016137 Expansion of 1/((1-3*x)*(1-6*x)).

Original entry on oeis.org

1, 9, 63, 405, 2511, 15309, 92583, 557685, 3352671, 20135709, 120873303, 725416965, 4353033231, 26119793709, 156723545223, 940355620245, 5642176768191, 33853189749309, 203119525916343, 1218718317759525, 7312313393341551, 43873890820402509, 263243376303474663, 1579460351964026805, 9476762394213697311
Offset: 0

Views

Author

Keywords

Crossrefs

Second column of triangle A075498.

Programs

Formula

a(n) = (3^n)*Stirling2(n+2, 2), n >= 0, with Stirling2(n, m) = A008277(n, m).
a(n) = 2*6^n - 3^n.
E.g.f.: (d^2/dx^2)((((exp(3*x)-1)/3)^2)/2!) = -exp(3*x) + 2*exp(6*x).
With leading zero, this is (6^n - 3^n)/3, the binomial transform of A016127 (with extra leading zero). - Paul Barry, Aug 20 2003
With leading zero, this is the fourth binomial transform of A001045, with a(n) = (2^n-1)(3^n/3 - 0^n/3) = A000225(n)*(A000244(n-1) - 0^n/3). - Paul Barry, Apr 28 2004
a(n) = Sum_{k=0..n} A100852(n,k). - Reinhard Zumkeller, Nov 20 2004
Sum_{k=1..n} 3^(k-1)*3^(n-k)*binomial(n, k). - Zerinvary Lajos, Sep 24 2006
a(n) = 9*a(n-1) - 18*a(n-2), n >= 2. - Vincenzo Librandi, Mar 14 2011

Extensions

More terms added by G. C. Greubel, Nov 14 2024

A016170 Expansion of 1/((1-6*x)*(1-8*x)).

Original entry on oeis.org

1, 14, 148, 1400, 12496, 107744, 908608, 7548800, 62070016, 506637824, 4113568768, 33271347200, 268347559936, 2159841173504, 17357093552128, 139326933401600, 1117436577120256, 8956419276406784, 71752914167922688
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 14^(n-1) else 14*Self(n-1) -48*Self(n-2): n in [1..31]]; // G. C. Greubel, Nov 10 2024
    
  • Maple
    A016170:=n->4*8^n-3*6^n: seq(A016170(n), n=0..30); # Wesley Ivan Hurt, May 03 2017
  • Mathematica
    CoefficientList[Series[1/((1-6x)(1-8x)),{x,0,30}],x] (* or *) LinearRecurrence[{14,-48},{1,14},30] (* Harvey P. Dale, Dec 08 2011 *)
  • PARI
    Vec(1/((1-6*x)*(1-8*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 24 2012
    
  • SageMath
    A016170=BinaryRecurrenceSequence(14,-48,1,14)
    [A016170(n) for n in range(31)] # G. C. Greubel, Nov 10 2024

Formula

a(n) = Sum_{k=1..n} 2^(n-1)*3^(n-k)*binomial(n,k). - Zerinvary Lajos, Sep 24 2006
From R. J. Mathar, Sep 18 2008: (Start)
a(n) = 4*8^n - 3*6^n = A081201(n+1).
Binomial transform of A081033. (End)
a(n) = 8*a(n-1) + 6^n. - Vincenzo Librandi, Feb 09 2011
a(0)=1, a(1)=14, a(n) = 14*a(n-1) - 48*a(n-2). - Harvey P. Dale, Dec 08 2011
E.g.f.: 4*exp(8*x) - 3*exp(6*x). - G. C. Greubel, Nov 10 2024

A071952 Diagonal T(n, 4) of triangle in A071951.

Original entry on oeis.org

1, 40, 1092, 25664, 561104, 11807616, 243248704, 4950550528, 100040447232, 2013177300992, 40412056994816, 810023815790592, 16221871691714560, 324694197936160768, 6496965245491888128, 129976281056339296256
Offset: 4

Views

Author

N. J. A. Sloane, Jun 16 2002

Keywords

Crossrefs

Programs

  • GAP
    List([4..20], n-> 2^(n-7)*(20*3^n - 7*6^n + 10^n - 28)/315); # G. C. Greubel, Mar 16 2019
  • Magma
    [2^(n-7)*(20*3^n - 7*6^n + 10^n - 28)/315: n in [4..20]]; // G. C. Greubel, Mar 16 2019
    
  • Mathematica
    Flatten[ Table[ Sum[(-1)^{r + 4}(2r + 1)(r^2 + r)^n/((r + 5)!(4 - r)!), {r, 1, 4}], {n, 4, 20}]]
    LinearRecurrence[{40, -508, 2304, -2880}, {1, 40, 1092, 25664}, 20] (* G. C. Greubel, Mar 16 2019 *)
  • PARI
    {a(n) = 2^(n-7)*(20*3^n - 7*6^n + 10^n - 28)/315}; \\ G. C. Greubel, Mar 16 2019
    
  • Sage
    [2^(n-7)*(20*3^n - 7*6^n + 10^n - 28)/315 for n in (4..20)] # G. C. Greubel, Mar 16 2019
    

Formula

From Wolfdieter Lang, Nov 07 2003: (Start)
a(n+4) = A071951(n+4, 4) = (-7*2^n + 405*6^n - 2268*12^n + 2500*20^n)/630, n >= 0.
G.f.: x^4/((1-2*1*x)*(1-3*2*x)*(1-4*3*x)*(1-5*4*x)). (End)
a(n) = det(|ps(i+2,j+1)|, 1 <= i,j <= n-4), where ps(n,k) are Legendre-Stirling numbers of the first kind (A129467) and n > 3. - Mircea Merca, Apr 06 2013
From G. C. Greubel, Mar 16 2019: (Start)
a(n) = 2^(n-7)*(20*3^n - 7*6^n + 10^n - 28)/315.
E.g.f.: (1 - exp(2*x))^4*(14 + 28*exp(2*x) + 28*exp(4*x) + 20*exp(6*x) + 10*exp(8*x) + 4*exp(10*x) + exp(12*x))/8!. (End)

Extensions

More terms from Robert G. Wilson v, Jun 19 2002
Definition corrected by Georg Fischer, Jul 07 2025

A016175 Expansion of 1/((1-6*x)*(1-12*x)).

Original entry on oeis.org

1, 18, 252, 3240, 40176, 489888, 5925312, 71383680, 858283776, 10309483008, 123774262272, 1485653944320, 17830024114176, 213973350064128, 2567758564933632, 30813572964188160, 369765696680165376, 4437205286821429248, 53246565001813819392, 638959389381505843200, 7667516328736510181376, 92010217881788762554368
Offset: 0

Views

Author

Keywords

Crossrefs

Second column of triangle A075501.

Programs

Formula

a(n) = (6^n)*Stirling2(n+2, 2), n >= 0, with Stirling2(n, m) = A008277(n, m).
a(n) = 2*12^n - 6^n.
E.g.f.: (d^2/dx^2)((((exp(6*x)-1)/6)^2)/2!) = -exp(6*x) + 2*exp(12*x).
a(n) = 3^n*binomial(2^(n+1), 2). - Al Hakanson (hawkuu(AT)gmail.com), Jan 07 2009
a(n) = 12*a(n-1) + 6^n, n >= 1. - Vincenzo Librandi, Feb 09 2011
a(n) = 18*a(n-1) - 72*a(n-2), n >= 2. - Vincenzo Librandi, Feb 09 2011

Extensions

More terms added by G. C. Greubel, Nov 13 2024

A016172 Expansion of 1/((1-6*x)*(1-9*x)).

Original entry on oeis.org

1, 15, 171, 1755, 17091, 161595, 1501011, 13789035, 125780931, 1142106075, 10339420851, 93417584715, 842935044771, 7599476096955, 68473649036691, 616733026314795, 5553418346740611, 49997691780110235
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A016129.

Programs

Formula

a(n) = (9^(n+1) - 6^(n+1))/3. - Lambert Klasen (lambert.klasen(AT)gmx.net), Feb 05 2005
a(0)=1, a(n) = 9*a(n-1) + 6^n. - Vincenzo Librandi, Feb 09 2011
a(0)=1, a(1)=15, a(n) = 15*a(n-1) - 54*a(n-2). - Vincenzo Librandi, Feb 09 2011
E.g.f.: 3*exp(9*x) - 2*exp(6*x). - G. C. Greubel, Nov 10 2024

A016174 Expansion of 1/((1-6*x)*(1-11*x)).

Original entry on oeis.org

1, 17, 223, 2669, 30655, 344981, 3841447, 42535853, 469573999, 5175391685, 56989774711, 627250318877, 6901930289983, 75934293883829, 835355596886215, 9189381750732941, 101086020367969807, 1111963150707112613, 12231696217734907159, 134549267754823989245, 1480045601461503944671, 16280523553027183769237
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A016129.

Programs

Formula

a(n) = (11^(n+1) - 6^(n+1))/5. - Lambert Klasen (lambert.klasen(AT)gmx.net), Feb 06 2005
a(n) = 11*a(n-1) + 6^n, a(0)=1. - Vincenzo Librandi, Feb 09 2011
E.g.f.: (1/5)*(11*exp(11*x) - 6*exp(6*x)). - G. C. Greubel, Nov 13 2024

Extensions

More terms added by G. C. Greubel, Nov 13 2024
Showing 1-10 of 30 results. Next