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-7 of 7 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

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

Original entry on oeis.org

6, 24, 132, 804, 5196, 34872, 240288, 1688244, 12040188, 86892384, 633162360, 4650680640, 34390540320, 255773538240, 1911730760832, 14350853162676, 108139250403804, 817629606524112, 6200696697358344, 47152195812692664
Offset: 1

Views

Author

Max Alekseyev, Aug 04 2005

Keywords

Comments

The number of linear arrangements is given by A110706 and the number of circular arrangements counted up to rotations is given by A110710.

Crossrefs

Programs

  • Mathematica
    b = Binomial; a[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}]; Array[a, 20] (* Jean-François Alcover, Dec 04 2015, adapted from PARI *)
  • 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)-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)) ))

Formula

a(n) = 2 * Sum[k=0..[n/2]] binomial(n-1, k) * ( binomial(n-1, k)*(binomial(2n+1-2k, n+1)-3*binomial(2n-1-2k, n+1)) + binomial(n-1, k+1)*(binomial(2n-2k, n+1)-3*binomial(2n-2k-2, n+1)) )
a(n) = A110706(n) - A110711(n)
a(n) = 2*A000172(n-1)+2*A000172(n) - Mark van Hoeij, Jul 14 2010
Conjecture: n^2*a(n) -3*n*(2*n-1)*a(n-1) -3*(n-1)*(5*n-12)*a(n-2) -8*(n-3)^2*a(n-3)=0. - R. J. Mathar, Jul 26 2014
a(n) ~ 3^(3/2) * 2^(3*n - 1) / (Pi*n). - Vaclav Kotesovec, Nov 09 2024

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

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.

A283615 Irregular triangle read by rows: T(n,k) is the number of necklaces 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, 1, 2, 1, 1, 2, 5, 4, 2, 1, 2, 7, 16, 18, 12, 4, 1, 2, 11, 32, 70, 92, 82, 40, 10, 1, 2, 13, 56, 166, 348, 510, 520, 350, 140, 26, 1, 2, 17, 88, 336, 932, 1948, 2992, 3404, 2756, 1518, 504, 80, 1, 2, 19, 124, 584, 2056, 5524, 11444, 18298, 22428, 20706, 13944, 6468, 1848, 246, 1, 2, 23, 168, 944, 3976, 13120, 34064, 70380, 115516
Offset: 0

Views

Author

Stefan Hollos, Apr 11 2017

Keywords

Comments

T(n,k) is the number of unique circular arrays (A283614) given equivalence under rotation.

Examples

			Table for n=[0..6], k=[0..12]
    0 1  2   3    4     5     6      7      8       9      10      11      12
-----------------------------------------------------------------------------
0 | 1
1 | 1 2  1
2 | 1 2  5   4    2
3 | 1 2  7  16   18    12     4
4 | 1 2 11  32   70    92    82     40     10
5 | 1 2 13  56  166   348   510    520    350     140      26
6 | 1 2 17  88  336   932  1948   2992   3404    2756    1518     504      80
The 13 necklaces for n=5, k=2 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].
		

Crossrefs

Programs

  • Maxima
    g(x,y):=2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1;
    A283614(n,k):=coeff(limit(diff(g(x,y),y,n)/n!,y,0),x,k);
    A283615(n,k):=block([s,d],
      s:0,
      for d in divisors(gcd(n,k)) do
        s:s+totient(d)*A283614(n/d,k/d),
      return(s/(2*n+k)));

Formula

T(n,k) = Sum_{d|gcd(n,k)} phi(d) * A283614(n/d,k/d) / (2*n+k) where phi is Euler's totient function (A000010).
T(n,2*n) = A003239(n).
T(n,2*n-1) = 2*binomial(2*(n-1), n-1).
T(n,n) = A110710(n).
Showing 1-7 of 7 results.