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-8 of 8 results.

A110706 Number of linear arrangements of n blue, n red and n green items such that there are no adjacent items of the same color.

Original entry on oeis.org

1, 6, 30, 174, 1092, 7188, 48852, 339720, 2403588, 17236524, 124948668, 913820460, 6732898800, 49918950240, 372104853600, 2786716100592, 20955408717396, 158149624268220, 1197390368733804, 9091866006950892, 69214297980023256, 528150412279712856
Offset: 0

Views

Author

Max Alekseyev, Aug 04 2005

Keywords

Comments

The number of circular arrangements is given by A110707 and A110710.

Crossrefs

Programs

  • Magma
    [2*(&+[Binomial(n-1, k)*(Binomial(n-1, k)*Binomial(2*n+1-2*k, n+1) + Binomial(n-1, k+1)*Binomial(2*n-2*k, n+1)): k in [0..Floor(n/2)]]): n in [1..25]]; // G. C. Greubel, Nov 24 2018
    
  • Maple
    a:= proc(n) option remember; `if`(n<2, 1+5*n,
          ((7*n-4)*a(n-1)+8*(n-2)^2*a(n-2)/(n+1))/n)
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Sep 09 2023
  • Mathematica
    Table[2*(Sum[Binomial[n-1,k]*(Binomial[n-1,k]*Binomial[2n+1-2k, n+1]+Binomial[n-1,k+1]*Binomial[2n-2k,n+1]),{k,0,Floor[n/2]}]),{n,1,20}] (* Vaclav Kotesovec, Oct 18 2012 *)
    Table[2 (Binomial[2 n + 1, n + 1] HypergeometricPFQ[{1 - n, 1 - n, 1/2 - n/2, -(n/2)}, {1, -(1/2) - n, -n}, 1] + (n - 1) Binomial[2 n, n + 1] HypergeometricPFQ[{1 - n, 2 - n, 1/2 - n/2, 1 - n/2}, {2, 1/2 - n, -n}, 1]), {n, 10}] (* Eric W. Weisstein, May 26 2017 *)
    RecurrenceTable[{n(n+1)*a[n] == (n+1)*(7*n-4)*a[n-1] +8*(n-2)^2*a[n-2], a[1]==6, a[2]==30}, a, {n, 10}] (* Eric W. Weisstein, May 27 2017 *)
  • PARI
    a(n)=2*sum(k=0,n\2,binomial(n-1,k)*(binomial(n-1,k)*binomial(2*n+1-2*k,n+1)+binomial(n-1,k+1)*binomial(2*n-2*k,n+1)))
    
  • Sage
    [2*sum(binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1) + binomial(n-1, k+1)*binomial(2*n-2*k, n+1))  for k in range(1+floor(n/2))) for n in (1..25)] # G. C. Greubel, Nov 24 2018

Formula

a(n) = 2 *( Sum_{k=0..floor(n/2)} binomial(n-1, k) * ( binomial(n-1, k) * binomial(2n+1-2k, n+1) + binomial(n-1, k+1)*binomial(2n-2k, n+1)) ).
a(n) = ((3*n-1)*A000172(n-1) + (3*n+2)*A000172(n))/(n+1).
D-finite with recurrence: n*(n+1)*a(n) = (n+1)*(7*n-4)*a(n-1) + 8*(n-2)^2*a(n-2). - Vaclav Kotesovec, Oct 18 2012
a(n) ~ 9*sqrt(3)*2^(3*n-2)/(Pi*n). - Vaclav Kotesovec, Oct 18 2012
G.f.: (2-x)*(1-8*x)^(-1/3)*(x+1)^(-2/3)*hypergeom([1/3, 1/3],[1],27*x^2/(8*x-1)/(x+1)^2) + 3*x*(2*x-1)^2*(1-8*x)^(-4/3)*(x+1)^(-8/3) * hypergeom([4/3, 4/3],[2],27*x^2/(8*x-1)/(x+1)^2) - 2. - Mark van Hoeij, May 14 2013
a(n) = 6*A190917(n) for n >= 1. - R. J. Mathar, Nov 01 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 09 2023

A110710 Number of ternary necklaces with n beads of each color and no adjacent beads of the same color (i.e., no substrings 00, 11, 22).

Original entry on oeis.org

1, 2, 5, 16, 70, 348, 1948, 11444, 70380, 445944, 2896590, 19186740, 129186596, 881808728, 6089851874, 42482906040, 298976142764, 2120377458900, 15141289233972, 108784152585236, 785869931659980, 5705406374249272
Offset: 0

Views

Author

Max Alekseyev, Aug 05 2005

Keywords

Comments

The number of circular arrangements (counted up to rotations) of n blue, n red and n green items such that there are no adjacent items of the same color. The number of various linear arrangements is given by A110706, A110707 and A110711.

Examples

			For n=2 there are 5 necklaces: 010212, 012012, 012021, 012102, 021021.
		

Crossrefs

Programs

  • Mathematica
    b = Binomial; A110707[n_] := 2*Sum[b[n - 1, k]*(b[n - 1, k]*(b[2*n + 1 - 2*k, n + 1] - 3*b[2*n - 1 - 2*k, n + 1]) + b[n - 1, k + 1]*(b[2*n - 2*k, n + 1] - 3*b[2*n - 2*k - 2, n + 1])), {k,0, n/2}]; a[n_] := DivisorSum[n, A110707[n/#]*EulerPhi[#]&]/(3n); a[0]=1; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Dec 04 2015, adapted from PARI *)
  • PARI
    { A110707(n) = 2 * sum(k=0,n\2, binomial(n-1,k) * (binomial(n-1,k)*(binomial(2*n+1-2*k,n+1)-3*binomial(2*n-1-2*k,n+1)) + binomial(n-1,k+1)*(binomial(2*n-2*k,n+1)-3*binomial(2*n-2*k-2,n+1)) )); A110710(n) = sumdiv(n,d,A110707(n\d)*eulerphi(d))\(3*n); }

Formula

a(n) = Sum_{d|n} A110707(n/d)*eulerphi(d) / (3n) for n>0, a(0)=1.
a(n) ~ sqrt(3) * 2^(3*n - 1) / (Pi * n^2). - Vaclav Kotesovec, Mar 20 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 04 2015

A141147 Number of linear arrangements of n blue, n red and n green items such that the first item is blue and there are no adjacent items of the same color (first and last elements considered as adjacent).

Original entry on oeis.org

2, 8, 44, 268, 1732, 11624, 80096, 562748, 4013396, 28964128, 211054120, 1550226880, 11463513440, 85257846080, 637243586944, 4783617720892, 36046416801268, 272543202174704, 2066898899119448, 15717398604230888
Offset: 1

Views

Author

Max Alekseyev, Jun 10 2008

Keywords

Crossrefs

Programs

  • Maple
    A141147 := n -> 2^n*hypergeom([n, (1-n)/2, -n/2],[1, 1],1);
    seq(simplify(A141147(i)),i=1..20); # Peter Luschny, Jan 15 2012
  • PARI
    { a(n) = sum(k=0,n\2, binomial(n,2*k) * binomial(2*k,k) * binomial(n-1+k,k) * 2^(n-2*k) ) }

Formula

a(n) = A110707(n) / 3 = (A000172(n) + A000172(n-1)) * 2 / 3.
a(n) = Sum_{k=0..floor(n/2)} binomial(n,2k) * binomial(2k,k) * binomial(n-1+k,k) * 2^(n-2k).
a(n) = 2^n*Hypergeometric([n,(1-n)/2,-n/2],[1, 1],1). - Peter Luschny, Jan 15 2012
Recurrence: (3*n^3 + 13*n^2 + 16*n + 4)*a(n+2) = (21*n^3 + 73*n^2 + 74*n + 16)*a(n+1) + (24*n^3 + 32*n^2)*a(n). - Ralf Stephan, Feb 11 2014
a(n) = (1/n) * Sum_{k = floor(n/2)..n} k * binomial(n,k)^2 * binomial(2*k,n). - Peter Bala, Mar 19 2023

A197657 Row sums of A194595.

Original entry on oeis.org

1, 4, 22, 134, 866, 5812, 40048, 281374, 2006698, 14482064, 105527060, 775113440, 5731756720, 42628923040, 318621793472, 2391808860446, 18023208400634, 136271601087352, 1033449449559724, 7858699302115444, 59906766929537116, 457685157123172664
Offset: 0

Views

Author

Susanne Wienand, Oct 17 2011

Keywords

Comments

Number of meanders of length (n+1)*3 which are composed by arcs of equal length and a central angle of 120 degrees.
Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m>0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 3.
For 0 <= n <= 16, a(n) = the hypergraph Fuss-Catalan number FC_1^(2,n+1) in the notation of Chavan et al. - see 7.1 in the Appendix. - Peter Bala, Apr 11 2023

Examples

			Some examples of list S and allocated values of dir if n = 4:
Length(S) = (4+1)*3 = 15.
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L
dir: 1,2,0,1,2,0,1,2,0,1,2,0,1,2,0
  S: L,L,L,L,R,L,L,R,L,L,R,L,L,L,L
dir: 1,2,0,1,1,1,2,2,2,0,0,0,1,2,0
  S: L,R,L,L,L,L,L,R,L,L,R,L,R,R,R
dir: 1,1,1,2,0,1,2,2,2,0,0,0,0,2,1
Each value of dir occurs 15/3 = 5 times.
		

Crossrefs

Programs

  • Maple
    A197657 := proc(n)
        (A000172(n) + A000172(n+1)) / 3 ;
    end proc; # R. J. Mathar, Jul 26 2014
    a := n -> 2^n*hypergeom([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1):
    seq(simplify(a(n)), n = 0..21); # Peter Luschny, Mar 26 2023
  • Mathematica
    A197657[n_] := Sum[Sum[Sum[(-1)^(j + i)* Binomial[i, j]*Binomial[n, k]^3*(n + 1)^j*(k + 1)^(2 - j)/(k + 1)^2, {i, 0, 2}], {j, 0, 2}], {k, 0, n}]; Table[A197657[n], {n, 0, 16}]  (* Peter Luschny, Nov 02 2011 *)
  • PARI
    A197657(n) = {sum(k=0,n,if(n == 1+2*k,3,(1+k)*(1-((n-k)/(1+k))^3)/(1+2*k-n))*binomial(n,k)^3)} \\ Peter Luschny, Nov 24 2011
  • SageMath
    def A197657(n):
        return 2^n*hypergeometric([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1).simplify_hypergeometric()
    for n in (0..21): print(A197657(n)) # Peter Luschny, Mar 26 2023
    

Formula

a(n) = Sum{k=0..n} Sum{j=0..2} Sum{i=0..2} (-1)^(j+i)*C(i,j)*C(n,k)^3*(n+1)^j*(k+1)^(2-j)/(k+1)^2. - Peter Luschny, Nov 02 2011
a(n) = Sum_{k=0..n} h(n,k)*binomial(n,k)^3, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^3)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 3. - Peter Luschny, Nov 24 2011
a(n) = A141147(n+1)/2 = A110707(n+1)/6 = (A000172(n)+A000172(n+1))/3. - Max Alekseyev, Jul 15 2014
Conjecture: (n+1)^2*a(n) -3*(n+1)*(2*n+1)*a(n-1) -3*n*(5*n-7)*a(n-2) -8*(n-2)^2*a(n-3)=0. - R. J. Mathar, Jul 26 2014
a(n) = 2^n*hypergeom([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1). - Peter Luschny, Mar 26 2023
a(n) ~ sqrt(3) * 2^(3*n+1) / (Pi*n). - Vaclav Kotesovec, Apr 17 2023

A110711 Number of linear arrangements of n blue, n red and n green items such that first and last elements have the same color but there are no adjacent items of the same color.

Original entry on oeis.org

0, 6, 42, 288, 1992, 13980, 99432, 715344, 5196336, 38056284, 280658100, 2082218160, 15528409920, 116331315360, 874985339760, 6604555554720, 50010373864416, 379760762209692, 2891169309592548, 22062102167330592
Offset: 1

Views

Author

Max Alekseyev, Aug 04 2005

Keywords

Comments

The number of linear arrangements is given by A110706 (first and last elements are not adjacent) and A110707 (first and last elements are adjacent) and the number of circular arrangements (counted up to rotations) is given by A110710.

Crossrefs

Programs

  • Maple
    ogf := 6*((x-2)*hypergeom([1/3,1/3],[1], 27*x^2/((8*x-1)*(x+1)^2)) + 2*hypergeom([1/3,1/3],[2], 27*x^2/((8*x-1)*(x+1)^2))) / ((1-2* x)*(1+x)^(2/3)*(1-8*x)^(1/3));
    series(ogf, x=0, 30); # Mark van Hoeij, Jan 22 2013
  • PARI
    a(n) = 6 * sum(k=0,n\2, binomial(n-1,k) * ( binomial(n-1,k)*binomial(2*n-1-2*k,n+1) + binomial(n-1,k+1)*binomial(2*n-2*k-2,n+1) ))

Formula

a(n) = 6 * Sum_{k=0..floor(n/2)} binomial(n-1, k) * ( binomial(n-1, k)*binomial(2n-1-2k, n+1) + binomial(n-1, k+1)*binomial(2n-2k-2, n+1) ).
a(n) = A110706(n) - A110707(n).
a(n) = ((n-3)*A000172(n-1) + n*A000172(n))/(n+1). - Mark van Hoeij, Jul 14 2010
Conjecture: -(n+1)*(n-2)*a(n) + (7*n^2 - 13*n + 4)*a(n-1) + 8*(n-2)^2*a(n-2) = 0. - R. J. Mathar, Nov 01 2015

A141146 Number of linear arrangements of n blue, n red and n green items such that first and last elements are blue but there are no adjacent items of the same color.

Original entry on oeis.org

0, 2, 14, 96, 664, 4660, 33144, 238448, 1732112, 12685428, 93552700, 694072720, 5176136640, 38777105120, 291661779920, 2201518518240, 16670124621472, 126586920736564, 963723103197516, 7354034055776864, 56236603567496720
Offset: 1

Views

Author

Max Alekseyev, Jun 10 2008

Keywords

Crossrefs

Programs

  • PARI
    { a(n) = sum(k=0,n\2, binomial(n-1,2*k) * binomial(2*k,k) * binomial(n-1+k,k+1) * 2^(n-1-2*k) ) }

Formula

a(n) = A110711(n) / 3.
a(n) = Sum[k=0..[n/2]] binomial(n-1,2k) * binomial(2k,k) * binomial(n-1+k,k+1) * 2^(n-1-2k).
G.f.: (2*x-1)^2*(1-8*x)^(-4/3)*(x+1)^(-8/3)*hypergeom([4/3, 4/3],[2],27*x^2/((8*x-1)*(x+1)^2))-(1-8*x)^(-1/3)*(x+1)^(-2/3)*hypergeom([1/3, 1/3],[1],27*x^2/((8*x-1)*(x+1)^2)). - Mark van Hoeij, May 14 2013
Conjecture: -(n+1)*(n-2)*a(n) +(7*n^2-13*n+4)*a(n-1) +8*(n-2)^2*a(n-2)=0. - R. J. Mathar, Jul 23 2014

A141148 Number of aperiodic ternary necklaces with n beads of each color and no adjacent beads of the same color.

Original entry on oeis.org

2, 3, 14, 65, 346, 1929, 11442, 70310, 445928, 2896239, 19186738, 129184583, 881808726, 6089840427, 42482905678, 298976072384, 2120377458898, 15141288786096, 108784152585234, 785869928763325, 5705406374237814
Offset: 1

Views

Author

Max Alekseyev, Jun 10 2008

Keywords

Crossrefs

Formula

a(n) = Sum_{d|n} moebius(n/d) * A141147(d) / n.

A283614 T(n,k) = number of circular arrays of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.

Original entry on oeis.org

1, 2, 6, 4, 2, 10, 24, 28, 12, 2, 14, 56, 132, 180, 132, 40, 2, 18, 100, 352, 804, 1196, 1120, 600, 140, 2, 22, 156, 728, 2324, 5196, 8160, 8840, 6300, 2660, 504, 2, 26, 224, 1300, 5320, 15844, 34872, 56848, 67900, 57820, 33264, 11592, 1848, 2, 30, 304, 2108, 10512, 39064, 110480, 240288, 402556, 515844, 496944, 348600
Offset: 0

Views

Author

Stefan Hollos, Apr 01 2017

Keywords

Comments

The array is circular in the sense that the first and last elements are adjacent.
For linear arrays see A283613.

Examples

			The table starts with columns k=0..10 and rows n=0..5:
  | 0  1   2   3    4    5    6    7    8    9  10
-----------------------------------------------------------------
0 | 1
1 | 2  6   4
2 | 2 10  24  28   12
3 | 2 14  56 132  180  132   40
4 | 2 18 100 352  804 1196 1120  600  140
5 | 2 22 156 728 2324 5196 8160 8840 6300 2660 504
For n=2, k=3, the 28 arrays are:
[+0-0+0-] [+0+0-0-] [0-+0+0-] [0-0+0+-]
[0+-0+0-] [0+0-+0-] [0+0-0+-] [0+0+-0-]
[-0-0+0+] [-0+0-0+] [0-+0-0+] [0-0-+0+]
[0-0+-0+] [0-0+0-+] [0+-0-0+] [0+0-0-+]
[-+0-0+0] [-+0+0-0] [-0-+0+0] [-0+-0+0]
[-0+0-+0] [-0+0+-0] [+-0-0+0] [+-0+0-0]
[+0-+0-0] [+0-0-+0] [+0-0+-0] [+0+-0-0]
		

Crossrefs

Programs

  • Mathematica
    nmax=8; Flatten[CoefficientList[Series[CoefficientList[Series[2*(x*y + 1)/Sqrt[(1 - y)*(1 - (2*x + 1)^2*y)] - 1, {y, 0, nmax }], y], {x, 0, 2nmax + 1 }], x]] (* Indranil Ghosh, Apr 02 2017 *)

Formula

G.f.: 2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1.
T(n,0) G.f.: (1+y)/(1-y).
T(n,1) G.f.: 2*y*(3-y)/(1-y)^2.
T(n,2) G.f.: 4*y*(1+3*y-y^2)/(1-y)^3.
T(n,3) G.f.: 4*y^2*(1+y)*(7-2*y)/(1-y)^4.
T(n,4) G.f.: 4*y^2*(3+30*y+6*y^2-4*y^3)/(1-y)^5.
T(n,5) G.f.: 4*y^3*(33+101*y-8*y^3)/(1-y)^6.
T(n,n) = A110707(n).
T(n,2*n) = 2*binomial(2*n,n).
Sum_{2*n+k = m} T(n,k) = A265118(m), m > 3.
Showing 1-8 of 8 results.