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.

Previous Showing 11-20 of 38 results. Next

A037306 Triangle T(n,k) read by rows: the number of compositions of n into k parts, modulo cyclic shifts.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 4, 3, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 4, 7, 10, 7, 4, 1, 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1
Offset: 1

Views

Author

Jens Voß, Jun 30 2001

Keywords

Comments

Triangle obtained from A047996 by dropping the first column (k=0), and row (n=0).
T(n, k) = number of different ways the number n can be expressed as ordered sums of k positive integers, counting only once those ordered sums that can be transformed into each other by a cyclic permutation.
These might be described as cyclic compositions, or more loosely as cyclic partitions. - N. J. A. Sloane, Sep 05 2012

Examples

			Triangle begins
  1;
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  2,  2,  1,  1;
  1,  3,  4,  3,  1,  1;
  1,  3,  5,  5,  3,  1,  1;
  1,  4,  7, 10,  7,  4,  1,  1;
  1,  4, 10, 14, 14, 10,  4,  1,  1;
  1,  5, 12, 22, 26, 22, 12,  5,  1,  1;
  1,  5, 15, 30, 42, 42, 30, 15,  5,  1,  1;
T(6,3) = 4, since there are 4 essentially different ways 1+1+4, 1+2+3, 1+3+2 and 2+2+2 of expressing 6 as a sum of 3 summands (all others can be obtained by cyclically permuting the summands in one of the above sums).
		

References

  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

A047996 and A241926 are essentially identical to this entry.
Cf. A008965 (row sums), A000010, A007318, A027750, A215251, A004526 (column 2), A007997 (column 3), A008610 (column 4), A008646 (column 5), A032191 (column 6).
See A245558, A245559 for a closely related array.
See A052307 for compositions modulo cyclic shifts and reversal.

Programs

  • Haskell
    a037306 n k = div (sum $ map f $ a027750_row $ gcd n k) n where
       f d = a000010 d * a007318' (div n d) (div k d)
    a037306_row n = map (a037306 n) [1..n]
    a037306_tabl = map a037306_row [1..]
    -- Reinhard Zumkeller, Feb 06 2014
    
  • Maple
    A037306 := proc(n,k) local a,d; a := 0; for d in numtheory[divisors]( igcd(n,k)) do a := a+numtheory[phi](d)*binomial(n/d,k/d); end do: a/n; end proc:
    seq(seq(A037306(n,k), k=1..n), n=1..20); # R. J. Mathar, Jun 11 2011
  • Mathematica
    t[n_, k_] := Total[EulerPhi[#]*Binomial[n/#, k/#] & /@ Divisors[GCD[n, k]]]/n; Flatten[Table[t[n, k], {n, 13}, {k, n}]] (* Jean-François Alcover, Sep 08 2011, after formula *)
    nn=15;f[list_]:=Select[list,#>0&];Map[f,Transpose[Table[Drop[CoefficientList[Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^i/(1-x^i),{i,1,n}],{x,0,nn}],x],1],{n,1,nn}]]]//Grid  (* Geoffrey Critzer, Oct 30 2012 *)
  • PARI
    T(n, k) = sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d, k/d))/n; \\ Michel Marcus, Feb 10 2016

Formula

T(n,k) = (Sum_{d|gcd(n,k)} phi(d)*binomial(n/d,k/d))/n, where phi = A000010 = Euler's totient function. Also T(n,k) = A047996(n,k). - Paul Weisenhorn, Apr 06 2011

Extensions

More terms from David Wasserman, Mar 11 2002
Comments, reference, example from Paul Weisenhorn, Dec 18 2010

A007595 a(n) = C_n / 2 if n is even or ( C_n + C_((n-1)/2) ) / 2 if n is odd, where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 3, 7, 22, 66, 217, 715, 2438, 8398, 29414, 104006, 371516, 1337220, 4847637, 17678835, 64823110, 238819350, 883634026, 3282060210, 12233141908, 45741281820, 171529836218, 644952073662, 2430973304732, 9183676536076, 34766775829452, 131873975875180
Offset: 1

Views

Author

Keywords

Comments

Number of necklaces of 2 colors with 2n beads and n-1 black ones. - Wouter Meeussen, Aug 03 2002
Number of rooted planar binary trees up to reflection (trees with n internal nodes, or a total of 2n+1 nodes). - Antti Karttunen, Aug 19 2002
Number of even permutations avoiding 132.
Number of Dyck paths of length 2n having an even number of peaks at even height. Example: a(3)=3 because we have UDUDUD, U(UD)(UD)D and UUUDDD, where U=(1,1), D=(1,-1) and the peaks at even height are shown between parentheses. - Emeric Deutsch, Nov 13 2004
Number of planar trees (A002995) on n edges with one distinguished edge. - David Callan, Oct 08 2005
Assuming offset 0 this is an analog of A275165: pairs of two Catalan nestings with index sum n. - R. J. Mathar, Jul 19 2016

References

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

Crossrefs

a(n) = A047996(2*n, n-1) for n >= 1 and a(n) = A072506(n, n-1) for n >= 2.
Occurs in A073201 as rows 0, 2, 4, etc. (with a(0)=1 included).
Cf. also A003444, A007123.

Programs

  • Maple
    A007595 := n -> (1/2)*(Cat(n) + (`mod`(n,2)*Cat((n-1)/2))); Cat := n -> binomial(2*n,n)/(n+1);
  • Mathematica
    Table[(Plus@@(EulerPhi[ # ]Binomial[2n/#, (n-1)/# ] &)/@Intersection[Divisors[2n], Divisors[n-1]])/(2n), {n, 2, 32}] (* or *) Table[If[EvenQ[n], CatalanNumber[n]/2, (CatalanNumber[n] + CatalanNumber[(n-1)/2])/2], {n, 24}]
    Table[(CatalanNumber[n] + 2^n Binomial[1/2, (n + 1)/2] Sin[Pi n/2])/2, {n, 1, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
    Table[If[EvenQ[n],CatalanNumber[n]/2,(CatalanNumber[n]+CatalanNumber[(n-1)/2])/2],{n,30}] (* Harvey P. Dale, Sep 06 2021 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n % 2, (catalan(n) + catalan((n-1)/2))/2, catalan(n)/2); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: (2-2*x-sqrt(1-4*x)-sqrt(1-4*x^2))/x/4. - Vladeta Jovovic, Sep 26 2003
D-finite with recurrence: n*(n+1)*a(n) -6*n*(n-1)*a(n-1) +4*(2*n^2-10*n+9)*a(n-2) +8*(n^2+n-9)*a(n-3) -48*(n-3)*(n-4)*a(n-4) +32*(2*n-9)*(n-5)*a(n-5)=0. - R. J. Mathar, Jun 03 2014, adapted to offset Feb 20 2020
a(n) ~ 4^n /(2*sqrt(Pi)*n^(3/2)). - Ilya Gutkovskiy, Jul 19 2016
a(2n) = A000150(2n). - R. J. Mathar, Jul 19 2016
a(n) = (A000108(n) + 2^n * binomial(1/2, (n+1)/2) * sin(Pi*n/2))/2. - Vladimir Reshetnikov, Oct 03 2016
Sum_{n>=1} a(n)/4^n = (3-sqrt(3))/2 (A334843). - Amiram Eldar, Mar 20 2022

Extensions

Description corrected by Reiner Martin and Wouter Meeussen, Aug 04 2002

A008610 Molien series of 4-dimensional representation of cyclic group of order 4 over GF(2) (not Cohen-Macaulay).

Original entry on oeis.org

1, 1, 3, 5, 10, 14, 22, 30, 43, 55, 73, 91, 116, 140, 172, 204, 245, 285, 335, 385, 446, 506, 578, 650, 735, 819, 917, 1015, 1128, 1240, 1368, 1496, 1641, 1785, 1947, 2109, 2290, 2470, 2670, 2870, 3091, 3311, 3553, 3795, 4060, 4324, 4612, 4900, 5213, 5525, 5863
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of necklaces with 4 black beads and n white beads.
Also nonnegative integer 2 X 2 matrices with sum of elements equal to n, up to rotational symmetry.
The g.f. is Z(C_4,x), the 4-variate cycle index polynomial for the cyclic group C_4, with substitution x[i]->1/(1-x^i), i=1,...,4. Therefore by Polya enumeration a(n) is the number of cyclically inequivalent 4-necklaces whose 4 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_4,x). - Wolfdieter Lang, Feb 15 2005

Examples

			There are 10 inequivalent nonnegative integer 2 X 2 matrices with sum of elements equal to 4, up to rotational symmetry:
[0 0] [0 0] [0 0] [0 0] [0 1] [0 1] [0 1] [0 2] [0 2] [1 1]
[0 4] [1 3] [2 2] [3 1] [1 2] [2 1] [3 0] [1 1] [2 0] [1 1].
		

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 104.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, April 2004.

Crossrefs

Row n=2 of A343874.
Column k=4 of A037306 and A047996.

Programs

  • GAP
    a:=[1,1,3,5,10,14,22,30];; for n in [9..50] do a[n]:=2*a[n-1]-2*a[n-3] +2*a[n-4]-2*a[n-5]+2*a[n-7]-a[n-1]; od; a; # G. C. Greubel, Jan 31 2020
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) )); // G. C. Greubel, Jan 31 2020
    
  • Maple
    1/(1-x)/(1-x^2)^2/(1-x^4)*(1+2*x^3+x^4);
    seq(coeff(series(%, x, n+1), x, n), n=0..40);
  • Mathematica
    k = 4; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    LinearRecurrence[{2,0,-2,2,-2,0,2,-1}, {1,1,3,5,10,14,22,30}, 50] (* G. C. Greubel, Jan 31 2020 *)
  • PARI
    a(n)=if(n,([0,1,0,0,0,0,0,0; 0,0,1,0,0,0,0,0; 0,0,0,1,0,0,0,0; 0,0,0,0,1,0,0,0; 0,0,0,0,0,1,0,0; 0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,1; -1,2,0,-2,2,-2,0,2]^n*[1;1;3;5;10;14;22;30])[1,1],1) \\ Charles R Greathouse IV, Oct 22 2015
    
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4))) \\ G. C. Greubel, Jan 31 2020
    
  • Sage
    def A008610_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) ).list()
    A008610_list(50) # G. C. Greubel, Jan 31 2020
    

Formula

G.f.: (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) = (1-x+x^2+x^3)/((1-x)^2*(1-x^2)*(1-x^4)).
a(n) = (1/48)*(2*n^3 + 3*(-1)^n*(n + 4) + 12*n^2 + 25*n + 24 + 12*cos(n*Pi/2)). - Ralf Stephan, Apr 29 2014
G.f.: (1/4)*(1/(1-x)^4 + 1/(1-x^2)^2 + 2/(1-x^4)). - Herbert Kociemba, Oct 22 2016
a(n) = -A032801(-n), per formulae of Colin Barker (A032801) and R. Stephan (above). Also, a(n) - A032801(n+4) = (1+(-1)^signum(n mod 4))/2, i.e., (1,0,0,0,1,0,0,0,...) repeating, (offset 0). - Gregory Gerard Wojnar, Jul 09 2022

Extensions

Comment and example from Vladeta Jovovic, May 18 2000

A008646 Molien series for cyclic group of order 5.

Original entry on oeis.org

1, 1, 3, 7, 14, 26, 42, 66, 99, 143, 201, 273, 364, 476, 612, 776, 969, 1197, 1463, 1771, 2126, 2530, 2990, 3510, 4095, 4751, 5481, 6293, 7192, 8184, 9276, 10472, 11781, 13209, 14763, 16451, 18278, 20254, 22386, 24682, 27151, 29799, 32637, 35673
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of necklaces with 5 black beads and n white beads.
The g.f. is Z(C_5,x), the 5-variate cycle index polynomial for the cyclic group C_5, with substitution x[i]->1/(1-x^i), i=1,...,5. Therefore by Polya enumeration a(n) is the number of cyclically inequivalent 5-necklaces whose 5 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_5,x). - Wolfdieter Lang, Feb 15 2005

References

  • B. Sturmfels, Algorithms in Invariant Theory, Springer, '93, p. 65.

Crossrefs

Programs

  • Magma
    [Ceiling((n+4)*(n+3)*(n+2)*(n+1)/120): n in [0..50]]; // Vincenzo Librandi, Jun 11 2013
    
  • Maple
    seq(coeff(series((1+x^2+3*x^3+4*x^4+6*x^5+4*x^6+3*x^7+x^8+x^10)/((1-x)* (1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)), x, n+1), x, n), n = 0..50); # corrected by G. C. Greubel, Sep 06 2019
    seq(ceil(binomial(n,4)/5), n=4..41); # Zerinvary Lajos, Jan 12 2009
  • Mathematica
    k = 5; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[(1 +x^2 +3*x^3 +4*x^4 +6*x^5 +4*x^6 +3*x^7 +x^8 +x^10)/((1-x)*(1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)), {x,0,50}], x] (* Vincenzo Librandi, Jun 11 2013 *)
    LinearRecurrence[{4,-6,4,-1,1,-4,6,-4,1}, {1,1,3,7,14,26,42,66,99}, 50] (* Harvey P. Dale, Jan 11 2017 *)
  • PARI
    a(n)=ceil((n+4)*(n+3)*(n+2)*(n+1)/120)
    
  • PARI
    Vec((1-3*x+5*x^2-3*x^3+x^4)/((1-x)^4*(1-x^5)) + O(x^50)) \\ Altug Alkan, Oct 31 2015
    
  • Sage
    [ceil(binomial(n+5,5)/(n+5)) for n in (0..50)] # G. C. Greubel, Sep 06 2019

Formula

G.f.: (1 +x^2 +3*x^3 +4*x^4 +6*x^5 +4*x^6 +3*x^7 +x^8 +x^10)/((1-x)*(1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)).
a(-5-n) = a(n) for all integers.
a(n) = ceiling( binomial(n+5, 5) / (n+5) ).
G.f.: (1 -3*x +5*x^2 -3*x^3 +x^4)/((1-x)^4*(1-x^5)). - Michael Somos, Dec 04 2001
a(n) = (n^4 +10*n^3 +35*n^2 +50*n +24*(3 -2*(-1)^(2^(n-5*floor(n/5)) )))/120. - Luce ETIENNE, Oct 31 2015
G.f.: (4/(1-x^5) + 1/(1-x)^5)/5. - Herbert Kociemba, Oct 15 2016

A241926 Table read by antidiagonals: T(n,k) (n >= 1, k >= 1) is the number of necklaces with n black beads and k white beads.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 3, 4, 3, 1, 1, 3, 5, 5, 3, 1, 1, 4, 7, 10, 7, 4, 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed (the group is cyclic not dihedral). T(n,k) = T(k,n) follows immediately from the formula. - N. J. A. Sloane, May 03 2014
T(n, k) is the number of equivalence classes of k-tuples of residues modulo n, identifying those that differ componentwise by a constant and those that differ by a permutation. - Álvar Ibeas, Sep 21 2021

Examples

			The table starts:
  1, 1,  1,  1,  1,  1,   1,   1,   1,   1,   1,    1, ...
  1, 2,  2,  3,  3,  4,   4,   5,   5,   6,   6,    7, ...
  1, 2,  4,  5,  7, 10,  12,  15,  19,  22,  26,   31, ...
  1, 3,  5, 10, 14, 22,  30,  43,  55,  73,  91,  116, ...
  1, 3,  7, 14, 26, 42,  66,  99, 143, 201, 273,  364, ...
  1, 4, 10, 22, 42, 80, 132, 217, 335, 504, 728, 1038, ...
  ...
		

Crossrefs

Same as A047996 with first row and main diagonal removed.
A037306 is yet another version.
Cf. A003239 (main diagonal).
See A245558, A245559 for a closely related array.

Programs

  • Maple
    # Maple program for the table - N. J. A. Sloane, May 03 2014:
    with(numtheory);
    T:=proc(n,k) local d, s, g, t0;
    t0:=0; s:=n+k; g:=gcd(n,k);
    for d from 1 to s do
       if (g mod d) = 0 then t0:=t0+phi(d)*binomial(s/d,k/d); fi;
    od: t0/s; end;
    r:=n->[seq(T(n,k),k=1..12)];
    [seq(r(n),n=1..12)];
  • Mathematica
    T[n_, k_] := DivisorSum[GCD[n, k], EulerPhi[#] Binomial[(n+k)/#, n/#]& ]/ (n+k); Table[T[n-k+1, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 02 2015 *)
  • PARI
    T(n,k) = sumdiv(gcd(n,k),d,eulerphi(d)*binomial((n+k)\d,n\d))/(n+k)

Formula

T(n,k) = (Sum_{d | gcd(n,k)} phi(d)*binomial((n+k)/d, n/d))/(n+k). [Corrected by N. J. A. Sloane, May 03 2014]

Extensions

Edited by N. J. A. Sloane, May 03 2014
Elashvili et al. references supplied by Vladimir Popov, May 17 2014

A032191 Number of necklaces with 6 black beads and n-6 white beads.

Original entry on oeis.org

1, 1, 4, 10, 22, 42, 80, 132, 217, 335, 504, 728, 1038, 1428, 1944, 2586, 3399, 4389, 5620, 7084, 8866, 10966, 13468, 16380, 19811, 23751, 28336, 33566, 39576, 46376, 54132, 62832, 72675, 83661, 95988, 109668, 124936, 141778
Offset: 6

Views

Author

Keywords

Comments

The g.f. is Z(C_6,x)/x^6, the 6-variate cycle index polynomial for the cyclic group C_6, with substitution x[i]->1/(1-x^i), i=1,...,6. Therefore by Polya enumeration a(n+6) is the number of cyclically inequivalent 6-necklaces whose 6 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_6,x). Note the equivalence of this formulation with the one given as this sequence's name: start with a black 6-necklace (all 6 beads have labels 0). Insert after each of the 6 black beads k white ones if the label was k and then disregard the labels. - Wolfdieter Lang, Feb 15 2005
The g.f. of the CIK[k] transform of the sequence (b(n): n>=1), which has g.f. B(x) = Sum_{n>=1} b(n)*x^n, is CIK[k](x) = (1/k)*Sum_{d|k} phi(d)*B(x^d)^{k/d}. Here, k = 6, b(n) = 1 for all n >= 1, and B(x) = x/(1-x), from which we get another proof of the g.f.s given below. - Petros Hadjicostas, Jan 07 2018

Examples

			From _Petros Hadjicostas_, Jan 07 2018: (Start)
We explain why a(8) = 4. According to the theory of transforms by C. G. Bower, given in the weblink above, a(8) is the number of ways of arranging 6 indistinct unlabeled boxes (that may differ only in their size) as a necklace, on a circle, such that the total number of balls in all of them is 8. There are 4 ways for doing that on a circle: 311111, 221111, 212111, and 211211.
To translate these configurations of boxes into necklaces with 8 beads, 6 of them black and 2 of them white, we modify an idea given above by W. Lang. We replace each box that has m balls with a black bead followed by m-1 white beads. The four examples above become BWWBBBBB, BWBWBBBB, BWBBWBBB, and BWBBBWBB.
(End)
		

Crossrefs

Column k=6 of A047996.

Programs

  • Mathematica
    k = 6; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)

Formula

"CIK[ 6 ]" (necklace, indistinct, unlabeled, 6 parts) transform of 1, 1, 1, 1, ...
G.f.: (1-x+x^2+4*x^3+2*x^4+3*x^6+x^7+x^8)/((1-x)^6*(1+x)^3*(1+x+x^2)^2*(1-x+x^2)) (conjectured). - Ralf Stephan, May 05 2004
G.f.: (x^6)*(1-x+x^2+4*x^3+2*x^4+3*x^6+x^7+x^8)/((1-x)^2*(1-x^2)^2*(1-x^3)*(1-x^6)). (proving the R. Stephan conjecture (with the correct offset) in a different version; see Comments entry above). - Wolfdieter Lang, Feb 15 2005
G.f.: (1/6)*x^6*((1-x)^(-6)+(1-x^2)^(-3)+2*(1-x^3)^(-2)+2*(1-x^6)^(-1)). - Herbert Kociemba, Oct 22 2016

A123610 Triangle read by rows, where T(n,k) = (1/n)*Sum_{d|(n,k)} phi(d) * binomial(n/d,k/d)^2 for n >= k > 0, with T(n,0) = 1 for n >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 10, 4, 1, 1, 5, 20, 20, 5, 1, 1, 6, 39, 68, 39, 6, 1, 1, 7, 63, 175, 175, 63, 7, 1, 1, 8, 100, 392, 618, 392, 100, 8, 1, 1, 9, 144, 786, 1764, 1764, 786, 144, 9, 1, 1, 10, 205, 1440, 4420, 6352, 4420, 1440, 205, 10, 1, 1, 11, 275, 2475, 9900
Offset: 0

Views

Author

Paul D. Hanna, Oct 03 2006

Keywords

Comments

A variant of the triangle A047996 of circular binomial coefficients.

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
  1;
  1,  1;
  1,  2,   1;
  1,  3,   3,    1;
  1,  4,  10,    4,    1;
  1,  5,  20,   20,    5,    1;
  1,  6,  39,   68,   39,    6,    1;
  1,  7,  63,  175,  175,   63,    7,    1;
  1,  8, 100,  392,  618,  392,  100,    8,   1;
  1,  9, 144,  786, 1764, 1764,  786,  144,   9,  1;
  1, 10, 205, 1440, 4420, 6352, 4420, 1440, 205, 10, 1;
  ...
Example of column g.f.s are:
column 1: 1/(1 - x)^2;
column 2: Ser([1, 1, 3, 1]) / ((1 - x)^2*(1 - x^2)^2) = g.f. of A005997;
column 3: Ser([1, 2, 11, 26, 30, 26, 17, 6, 1]) / ((1 - x)^2*(1 - x^2)^2*(1 -x^3)^2);
column 4: Ser([1, 3, 28, 94, 240, 440, 679, 839, 887, 757, 550, 314, 148, 48, 11, 1]) / ((1 - x)^2*(1 - x^2)^2*(1 - x^3)^2*(1 - x^4)^2);
where Ser() denotes a polynomial in x with the given coefficients, as in Ser([1, 1, 3, 1]) = (1 + x + 3*x^2 + x^3).
		

Crossrefs

Cf. A123611 (row sums), A123612 (antidiagonal sums), A123617 (central terms).
Cf. A123618, A123619, A047996 (variant), A128545.

Programs

  • Mathematica
    T[, 0] = 1; T[n, k_] := 1/n DivisorSum[n, If[GCD[k, #] == #, EulerPhi[#]* Binomial[n/#, k/#]^2, 0]&]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 06 2015, adapted from PARI *)
  • PARI
    {T(n,k)=if(k==0,1,(1/n)*sumdiv(n,d,if(gcd(k,d)==d, eulerphi(d)*binomial(n/d,k/d)^2,0)))}

Formula

T(2*n+1, n) = (2*n + 1)*A000108(n)^2 = (2*n + 1)*((2*n)!/(n!(n+1)!))^2 = A000891(n) for n >= 0.
Row sums are 2*A047996(2*n,n) = 2*A003239(n) for n > 0.
Row sums equal the row sums of triangle A128545.
For n >= 1, the g.f. of column n has the form: P_n(x)/(Product_{m=1..n} (1 - x^m)^2), where P_n(x) is a polynomial with n^2 coefficients such that the sum of the coefficients is P_n(1) = (2*n - 1)!.
From Petros Hadjicostas, Oct 24 2017: (Start)
Proofs of the following formulae can be found in the links.
G.f.: Sum_{n>=1, k>=0} T(n,k)*x^n*y^k = -Sum_{s>=1} (phi(s)/s)*log(f(x^s,y^s)), where phi(s) is Euler's totient function at s, f(x,y) = (sqrt(g(x,y)) + 1 -(1 + y)*x)/2, and g(x,y) = 1 - 2*(1 + y)*x + (1 - y)^2*x^2. (Term T(0,0) is not used in this g.f.)
Row g.f.: Sum_{k>=0} T(n,k)*y^k = (1/n)*Sum_{d|n} phi(d)*R(n/d, y^d), where R(m, y) = [z^m] (1 + (1 + y)*z + y*z^2)^m. (End)

A032192 Number of necklaces with 7 black beads and n-7 white beads.

Original entry on oeis.org

1, 1, 4, 12, 30, 66, 132, 246, 429, 715, 1144, 1768, 2652, 3876, 5538, 7752, 10659, 14421, 19228, 25300, 32890, 42288, 53820, 67860, 84825, 105183, 129456, 158224, 192130, 231880, 278256, 332112, 394383, 466089, 548340
Offset: 7

Views

Author

Keywords

Comments

"CIK[ 7 ]" (necklace, indistinct, unlabeled, 7 parts) transform of 1, 1, 1, 1, ...
The g.f. is Z(C_7,x)/x^7, the 7-variate cycle index polynomial for the cyclic group C_7, with substitution x[i]->1/(1-x^i), i=1,...,7. Therefore by Polya enumeration a(n+7) is the number of cyclically inequivalent 7-necklaces whose 7 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_7,x) and the comment in A032191 on the equivalence of this problem with the one given in the 'Name' line. - Wolfdieter Lang, Feb 15 2005
From Petros Hadjicostas, Dec 08 2017: (Start)
For p prime, if a_p(n) is the number of necklaces with p black beads and n-p white beads, then (a_p(n): n>=1) = CIK[p](1, 1, 1, 1, ...). Since CIK[k](B(x)) = (1/k)*Sum_{d|k} phi(d)*B(x^d)^{k/d} with k = p and B(x) = x + x^2 + x^3 + ... = x/(1-x), we get Sum_{n>=1} a_p(n)*x^n = ((p-1)/(1 - x^p) + 1/(1 - x)^p)*x^p/p, which is Herbert Kociemba's general formula for the g.f. when p is prime.
We immediately get a_p(n) = ((p-1)/p)*I(p|n) + (1/p)*C(n-1,p-1) = ((p-1)/p)*I(p|n) + (1/n)*C(n,p) = ceiling(C(n,p)/n), which is a generalization of the conjecture made by N. J. A. Sloane and Wolfdieter Lang. (Here, I(condition) = 1 if the condition holds, and 0 otherwise. Also, as usual, for integers n and k, C(n,k) = 0 if 0 <= n < k.)
Since the sequence (a_p(n): n>=1) is column k = p of A047996(n,k) = T(n,k), we get from the documentation of the latter sequence that a_p(n) = T(n, p) = (1/n)*Sum_{d|gcd(n,p)} phi(d)*C(n/d, p/d), from which we get another proof of the formulae for a_p(n).
(End)

Crossrefs

Programs

  • Mathematica
    k = 7; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    DeleteCases[CoefficientList[Series[x^7 (x^6 - 5 x^5 + 13 x^4 - 17 x^3 + 13 x^2 - 5 x + 1)/((x^6 + x^5 + x^4 + x^3 + x^2 + x + 1) (1 - x)^7), {x, 0, 41}], x], 0] (* Michael De Vlieger, Oct 10 2016 *)

Formula

Empirically this is ceiling(C(n, 7)/n). - N. J. A. Sloane
G.f.: x^7*(x^6 - 5*x^5 + 13*x^4 - 17*x^3 + 13*x^2 - 5*x + 1)/((x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)*(1 - x)^7). - Gael Linder (linder.gael(AT)wanadoo.fr), Jan 13 2005
G.f.: (6/(1 - x^7) + 1/(1 - x)^7)*x^7/7; in general, for a necklace with p black beads and p prime, the g.f. is ((p-1)/(1 - x^p) + 1/(1 - x)^p)*x^p/p. - Herbert Kociemba, Oct 15 2016
a(n) = ceiling(binomial(n, 7)/n) (conjecture by Wolfdieter Lang).
a(n) = (6/7)*I(7|n) + (1/7)*C(n-1,6) = (6/7)*I(7|n) + (1/n)*C(n,7), where I(condition) = 1 if the condition holds, and = 0 otherwise. - Petros Hadjicostas, Dec 08 2017

A245558 Square array read by antidiagonals: T(n,k) = number of n-tuples of nonnegative integers (u_0,...,u_{n-1}) satisfying Sum_{j=0..n-1} j*u_j == 1 mod n and Sum_{j=0..n-1} u_j = m.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 3, 5, 5, 3, 1, 1, 3, 7, 8, 7, 3, 1, 1, 4, 9, 14, 14, 9, 4, 1, 1, 4, 12, 20, 25, 20, 12, 4, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2014

Keywords

Comments

The array is symmetric; for the entries on or below the diagonal see A245559.
If the congruence in the definition is changed from Sum_{j=0..n-1} j*u_j == 1 mod n to Sum_{j=0..n-1} j*u_j == 0 mod n we get the array shown in A241926, A047996, and A037306.
Differs from A011847 from row n = 9, k = 4 on; if the rows are surrounded by 0's, this yields A051168 without its rows 0 and 1, i.e., a(1) is A051168(2,1). - M. F. Hasler, Sep 29 2018
This array was first studied by Fredman (1975). - Petros Hadjicostas, Jul 10 2019

Examples

			Square array begins:
  1, 1,  1,  1,   1,   1,    1,    1,    1,    1, ...
  1, 1,  2,  2,   3,   3,    4,    4,    5,    5, ...
  1, 2,  3,  5,   7,   9,   12,   15,   18,   22, ...
  1, 2,  5,  8,  14,  20,   30,   40,   55,   70, ...
  1, 3,  7, 14,  25,  42,   66,   99,  143,  200, ...
  1, 3,  9, 20,  42,  75,  132,  212,  333,  497, ...
  1, 4, 12, 30,  66, 132,  245,  429,  715, 1144, ...
  1, 4, 15, 40,  99, 212,  429,  800, 1430, 2424, ...
  1, 5, 18, 55, 143, 333,  715, 1430, 2700, 4862, ...
  1, 5, 22, 70, 200, 497, 1144, 2424, 4862, 9225, ...
  ...
Reading by antidiagonals, we get:
  1;
  1, 1;
  1, 1,  1;
  1, 2,  2,  1;
  1, 2,  3,  2,  1;
  1, 3,  5,  5,  3,   1;
  1, 3,  7,  8,  7,   3,   1;
  1, 4,  9, 14, 14,   9,   4,  1;
  1, 4, 12, 20, 25,  20,  12,  4,  1;
  1, 5, 15, 30, 42,  42,  30, 15,  5,  1;
  1, 5, 18, 40, 66,  75,  66, 40, 18,  5, 1;
  1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1;
  ...
		

Crossrefs

This array is very similar to but different from A011847.
Rows include A001840, A006918, A051170, A011796, A011797, A031164. Main diagonal is A022553.

Programs

  • Maple
    # To produce the first 10 rows and columns (as on page 174 of the Elashvili et al. 1999 reference):
    with(numtheory):
    cnk:=(n,k) -> add(mobius(n/d)*d, d in divisors(gcd(n,k)));
    anmk:=(n,m,k)->(1/(n+m))*add( cnk(d,k)*binomial((n+m)/d,n/d), d in divisors(gcd(n,m))); # anmk(n,m,k) is the value of a_k(n,m) as in Theorem 1, Equation (4), of the Elashvili et al. 1999 reference.
    r2:=(n,k)->[seq(anmk(n,m,k),m=1..10)];
    for n from 1 to 10 do lprint(r2(n,1)); od:
  • Mathematica
    rows = 12;
    cnk[n_, k_] := Sum[MoebiusMu[n/d] d, {d , Divisors[GCD[n, k]]}];
    anmk[n_, m_, k_] := (1/(n+m)) Sum[cnk[d, k] Binomial[(n+m)/d, n/d], {d, Divisors[GCD[n, m]]}];
    r2[n_, k_] := Table[anmk[n, m, k], {m, 1, rows}];
    T = Table[r2[n, 1], {n, 1, rows}];
    Table[T[[n-k+1, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 05 2018, from Maple *)

A003444 Number of dissections of a polygon.

Original entry on oeis.org

1, 4, 12, 43, 143, 504, 1768, 6310, 22610, 81752, 297160, 1086601, 3991995, 14732720, 54587280, 202997670, 757398510, 2834510744, 10637507400, 40023636310, 150946230006, 570534578704, 2160865067312, 8199711378716, 31170212479588, 118686578956272
Offset: 4

Views

Author

Keywords

Comments

See A220881 for an essentially identical sequence, but with a different offset and a more precise definition. - N. J. A. Sloane, Dec 28 2012
Also number of necklaces of 2 colors with 2n beads and n-2 black ones. - Wouter Meeussen, Aug 03 2002

References

  • P. Lisonek, Closed forms for the number of polygon dissections. Journal of Symbolic Computation 20 (1995), 595-601.
  • R. C. Read, On general dissections of a polygon, Aequat. Math. 18 (1978), 370-388.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Table[(Plus@@(EulerPhi[ # ]Binomial[2n/#, (n-2)/# ] &)/@Intersection[Divisors[2n], Divisors[n-2]])/(2n), {n, 3, 32}]

Formula

a(n) = (1/(2n)) Sum_{d |(2n, k)} phi(d)*binomial(2n/d, k/d) with k=n-2. - Wouter Meeussen, Aug 03 2002

Extensions

More terms from Wouter Meeussen, Aug 03 2002
Previous Showing 11-20 of 38 results. Next