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

A047996 Triangle read by rows: T(n,k) is the (n,k)-th circular binomial coefficient, where 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Equivalently, T(n,k) = number of necklaces with k black beads and n-k white beads (binary necklaces of weight k).
The same sequence arises if we take the table U(n,k) = number of necklaces with n black beads and k white beads and read it by antidiagonals (cf. A241926). - Franklin T. Adams-Watters, May 02 2014
U(n,k) is also equal to the number of ways to express 0 as a sum of k elements in Z/nZ. - Jens Voß, Franklin T. Adams-Watters, N. J. A. Sloane, Apr 30 2014 - May 05 2014. See link ("A Note on Modular Partitions and Necklaces") for proof.
The generating function for column k is given by the substitution x_j -> x^j/(1-x^j) in the cycle index of the Symmetric Group of order k. - R. J. Mathar, Nov 15 2018
From Petros Hadjicostas, Jul 12 2019: (Start)
Regarding the comments above by Voss, Adams-Watters, and Sloane, note that Fredman (1975) proved that the number S(n, k, v) of vectors (a_0, ..., a_{n-1}) of nonnegative integer components that satisfy a_0 + ... + a_{n-1} = k and Sum_{i=0..n-1} i*a_i = v (mod n) is given by S(n, k, v) = (1/(n + k)) * Sum_{d | gcd(n, k)} A054535(d, v) * binomial((n + k)/d, k/d) = S(k, n, v).
This result was also proved by Elashvili et al. (1999), who also proved that S(n, k, v) = Sum_{d | gcd(n, k, v)} S(n/d, k/d, 1). Here, S(n, k, 0) = A241926(n, k) = U(n, k) = T(n + k, k) (where T(n, k) is the current array). Also, S(n, k, 1) = A245558(n, k). See also Panyushev (2011) for more general results and for generating functions.
Finally, note that A054535(d, v) = c_d(v) = Sum_{s | gcd(d,v)} s*Moebius(d/s). These are the Ramanujan sums, which equal also the von Sterneck function c_d(v) = phi(d) * Moebius(d/gcd(d, v))/phi(d/gcd(d, v)). We have A054535(d, v) = A054534(v, d).
It would be interesting to see whether there is a proof of the results by Fredman (1975), Elashvili et al. (1999), and Panyushev (2011) for a general v using Molien series as it is done by Sloane (2014) for the case v = 0 (in which case, A054535(d, 0) = phi(d)). (Even though the columns of array A054535(d, v) start at v = 1, we may start the array at column v = 0 as well.)
(End)
U(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

			Triangle starts:
[ 0]  1,
[ 1]  1,  1,
[ 2]  1,  1,  1,
[ 3]  1,  1,  1,  1,
[ 4]  1,  1,  2,  1,  1,
[ 5]  1,  1,  2,  2,  1,  1,
[ 6]  1,  1,  3,  4,  3,  1,  1,
[ 7]  1,  1,  3,  5,  5,  3,  1,  1,
[ 8]  1,  1,  4,  7, 10,  7,  4,  1,  1,
[ 9]  1,  1,  4, 10, 14, 14, 10,  4,  1,  1,
[10]  1,  1,  5, 12, 22, 26, 22, 12,  5,  1, 1,
[11]  1,  1,  5, 15, 30, 42, 42, 30, 15,  5, 1, 1,
[12]  1,  1,  6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, ...
		

References

  • N. G. de Bruijn, Polya's theory of counting, in: Applied Combinatorial Mathematics (E. F. Beckenbach, ed.), John Wiley and Sons, New York, 1964, pp. 144-184 (implies g.f. for this triangle).
  • Richard Stanley, Enumerative Combinatorics, 2nd. ed., Vol 1, Chapter I, Problem 105, pp. 122 and 168, discusses the number of subsets of Z/nZ that add to 0. - N. J. A. Sloane, May 06 2014
  • J. Voß, Posting to Sequence Fans Mailing List, April 30, 2014.
  • H. S. Wilf, personal communication to N. J. A. Sloane, Nov., 1990.
  • See A000031 for many additional references and links.

Crossrefs

Row sums: A000031. Columns 0-12: A000012, A000012, A004526, A007997(n+5), A008610, A008646, A032191-A032197.
See A037306 and A241926 for essentially identical triangles.
See A245558, A245559 for a closely related array.

Programs

  • Maple
    A047996 := proc(n,k) local C,d; if k= 0 then return 1; end if; C := 0 ; for d in numtheory[divisors](igcd(n,k)) do C := C+numtheory[phi](d)*binomial(n/d,k/d) ; end do: C/n ; end proc:
    seq(seq(A047996(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Apr 14 2011
  • Mathematica
    t[n_, k_] := Total[EulerPhi[#]*Binomial[n/#, k/#] & /@ Divisors[GCD[n, k]]]/n; t[0, 0] = 1; Flatten[Table[t[n, k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jul 19 2011, after given formula *)
  • PARI
    p(n) = if(n<=0, n==0, 1/n * sum(i=0,n-1, (x^(n/gcd(i,n))+1)^gcd(i,n) ));
    for (n=0,17, print(Vec(p(n)))); /* print triangle */
    /* Joerg Arndt, Sep 28 2012 */
    
  • PARI
    T(n,k) = if(n<=0, n==0, 1/n * sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d,k/d) ) );
    /* print triangle: */
    { for (n=0, 17, for (k=0, n, print1(T(n,k),", "); ); print(); ); }
    /* Joerg Arndt, Oct 21 2012 */

Formula

T(n, k) = (1/n) * Sum_{d | (n, k)} phi(d)*binomial(n/d, k/d).
T(2*n,n) = A003239(n); T(2*n+1,n) = A000108(n). - Philippe Deléham, Jul 25 2006
G.f. for row n (n>=1): (1/n) * Sum_{i=0..n-1} ( x^(n/gcd(i,n)) + 1 )^gcd(i,n). - Joerg Arndt, Sep 28 2012
G.f.: Sum_{n, k >= 0} T(n, k)*x^n*y^k = 1 - Sum_{s>=1} (phi(s)/s)*log(1-x^s*(1+y^s)). - Petros Hadjicostas, Oct 26 2017
Product_{d >= 1} (1 - x^d - y^d) = Product_{i,j >= 0} (1 - x^i*y^j)^T(i+j, j), where not both i and j are zero. (It follows from Somos' infinite product for array A051168.) - Petros Hadjicostas, Jul 12 2019

Extensions

Name edited by Petros Hadjicostas, Nov 16 2017

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

A032279 Number of bracelets (turnover necklaces) of n beads of 2 colors, 5 of them black.

Original entry on oeis.org

1, 1, 3, 5, 10, 16, 26, 38, 57, 79, 111, 147, 196, 252, 324, 406, 507, 621, 759, 913, 1096, 1298, 1534, 1794, 2093, 2421, 2793, 3199, 3656, 4152, 4706, 5304, 5967, 6681, 7467, 8311, 9234, 10222, 11298, 12446, 13691, 15015, 16445
Offset: 5

Views

Author

Keywords

Comments

From Vladimir Shevelev, Apr 23 2011: (Start)
Also number of non-equivalent necklaces of 5 beads each of them painted by one of n colors.
The sequence solves the so-called Reis problem about convex k-gons in case k=5. The full solution was given by H. Gupta (1979); I gave a short proof of Gupta's result and showed an equivalence of this problem and every one of the following problems: enumerating the bracelets of n beads of 2 colors, k of them black, and enumerating the necklaces of k beads each of them painted by one of n colors.
a(n) is an essentially unimprovable upper estimate for the number of distinct values of the permanent in (0,1)-circulants of order n with five 1's in every row. (End)
a(n+5) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the T_1 X h vibronic perturbation matrix, H(Q) (cf. Dunn & Bates). - Bradley Klee, Jul 20 2015
From Petros Hadjicostas, Jul 17 2018: (Start)
Let (c(n): n >= 1) be a sequence of nonnegative integers and let C(x) = Sum_{n>=1} c(n)*x^n be its g.f. Let k be a positive integer. Let a_k = (a_k(n): n >= 1) be the output sequence of the DIK[k] transform of sequence (c(n): n >= 1), and let A_k(x) = Sum_{n>=1} a_k(n)*x^n be its g.f. See Christian G. Bower's web link below. It can be proved that, when k is odd, A_k(x) = ((1/k)*Sum_{d|k} phi(d)*C(x^d)^(k/d) + C(x^2)^((k-1)/2)*C(x))/2.
For this sequence, k = 5, c(n) = 1 for all n >= 1, and C(x) = x/(1-x). Thus, a(n) = a_5(n) for all n >= 1. Since a_k(n) = 0 for 1 <= n <= k-1, the offset of this sequence is n = k = 5. Applying the formula for the g.f. of DIK[5] of (c(n): n >= 1) with C(x) = x/(1-x) and k = 5, we get A(x) = A_5(x) = x^5*((1/5)*Sum_{d|5} phi(d)*(1-x^d)^(-5/d) + (1+x)/(1-x^2)^3)/2, which obviously equals the g.f. in the formula section below.
The g.f. is also a special case of Herbert Kociemba's formula that is valid for both even and odd k: A_k(x) = x^k*((1/k)*Sum_{d|k} phi(d)*(1-x^d)^(-k/d) + (1+x)/(1-x^2)^Floor[(k+2)/2])/2.
Here, a(n) is defined to be the number of n-bead bracelets of two colors with 5 black beads and n-5 white beads. But it is also the number of dihedral compositions of n with 5 positive parts. (This statement is equivalent to Vladimir Shevelev's statement above that a(n) is the "number of non-equivalent necklaces of 5 beads each of them painted by one of n colors." By "necklaces" he means "turnover necklaces". See paragraph (2) of Section 2 in his 2004 paper in the Indian Journal of Pure and Applied Mathematics.)
Two cyclic compositions of n (with k = 5 parts) belong to the same equivalence class corresponding to a dihedral composition of n if and only if one can be obtained from the other by a rotation or reversal of order. (End)

Examples

			From _Petros Hadjicostas_, Jul 17 2018: (Start)
Every n-bead bracelet of two colors such that 5 beads are black and n-5 are white can be transformed into a dihedral composition of n with 5 positive parts in the following way. Start with one B bead and go in one direction (say clockwise) until you reach the next B bead. Continue this process until you come back to the original B bead.
Let b_i be the number of beads from B bead i until you reach the last W bead before B bead i+1 (or B bead 1). Here, b_i = 1 iff there are no W beads between B bead i and B bead i+1 (or B bead 5 and B bead 1). Then b_1 + b_2 + b_3 + b_4 + b_5 = n, and we get a dihedral composition of n. (Of course, b_2 + b_3 + b_4 + b_5 + b_1 and b_5 + b_4 + b_3 + b_2 + b_1 belong to the same equivalence class of the dihedral composition b_1 + b_2 + b_3 + b_4 + b_5.)
For example, a(8) = 5, and we have the following bracelets with 5 B beads and 3 W beads. Next to the bracelets we list the corresponding dihedral compositions of n with k=5 parts (they must be viewed on a circle):
BBBBBWWW <-> 1+1+1+1+4
BBBBWBWW <-> 1+1+1+2+3
BBWBBBWW <-> 1+2+1+1+3
BWBBWBWB <-> 2+1+2+2+1
BWBWBWBB <-> 2+2+2+1+1
(End)
		

References

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

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1-x+2*x^3-x^5+x^6)/((1-x)^2*(1-x^2)^2*(1-x^5))); // Vincenzo Librandi, Sep 07 2013
  • Maple
    seq(floor(n^4/240 + n^3/24 + 5*n^2/24 + 25*n/48 + 1 + (-1)^n*n/16), n=0..100); # Robert Israel, Jul 22 2015
  • Mathematica
    k = 5; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[(1 - x + 2 x^3 - x^5 + x^6) / ((1 - x)^2 (1 - x^2)^2 (1 - x^5)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 07 2013 *)
    k=5 (* Number of black beads in bracelet problem *); CoefficientList[Series[x^k*(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
  • PARI
    a(n) = round((n^4 -10*n^3 +50*n^2 -(110+30*(1-n%2))*n)/240 +3/5) \\ Washington Bomfim, Jul 17 2008
    

Formula

"DIK[ 5 ]" (necklace, indistinct, unlabeled, 5 parts) transform of 1, 1, 1, 1, ...
G.f.: x^5*(1-x+2*x^3-x^5+x^6)/((1-x)^2*(1-x^2)^2*(1-x^5)). - corrected for offset 5 by Robert Israel, Jul 22 2015
From Vladimir Shevelev, Apr 23 2011: (Start)
Put s(n,k,d)=1, if n == k (mod d), and 0, otherwise. Then
a(n) = (2/5)*s(n,0,5) + (n-1)*(n-3)*((n-2)*(n-4) + 15)/240, if n is odd >= 5;
a(n) = (2/5)*s(n,0,5) + (n-2)*(n-4)*((n-1)*(n-3) + 15)/240, if n is even >= 5. (End)
a(n+5) = floor(n^4/240 + n^3/24 + 5*n^2/24 + 25*n/48 + 1 + (-1)^n*n/16). - Robert Israel, Jul 22 2015
a(n) = (A008646(n-5) + A119963(n, 5))/2 = (A008646(n-5) + C(floor((n-1)/2), 2))/2 for n >= 5. - Petros Hadjicostas, Jul 17 2018

A103728 Coefficients of numerator polynomials of g.f.s for a certain necklace problem involving prime numbers.

Original entry on oeis.org

1, 0, 1, -1, 1, 1, -3, 5, -3, 1, 1, -5, 13, -17, 13, -5, 1, 1, -9, 41, -109, 191, -229, 191, -109, 41, -9, 1, 1, -11, 61, -203, 457, -731, 853, -731, 457, -203, 61, -11, 1, 1, -15, 113, -527, 1713, -4111, 7537, -10767, 12113, -10767, 7537, -4111, 1713, -527, 113, -15, 1, 1, -17, 145, -773, 2899, -8117, 17587
Offset: 1

Views

Author

Wolfdieter Lang, Feb 24 2005

Keywords

Comments

The row polynomials P(n,x) := Sum_{k=0..p(n)-1} a(n,k)*x^k, n >= 1, appear in the numerator of the g.f. G(p(n),x) for the numbers N(p(n),m) of inequivalent m-bead necklaces of two colors with p(n) beads of one color and m-p(n) beads of the other color. Here p(n)=A000040(n) (prime numbers). Equivalently, N(p(n),m) counts inequivalent necklaces with p(n) beads which are labeled with nonnegative numbers, such that the sum of the labels is m. For a proof of this equivalent formulation see a comment in A032191. Inequivalence is meant with respect to the cyclic group C_p(n).
This necklace g.f. is G(p(n),x) = P(n,x)/((1-x^p(n))*(1-x)^(p(n)-1)), n >= 1. The row polynomials P(n,x) are defined above. This g.f. is Z(C_p(n),x), the two variable (x[1] and x[p(n)]) cycle index polynomial for the cyclic group of prime order p(n), with substitution x[1]->1/(1-x^1)and x[p(n)]->1/(1-x^p(n)). This follows by Polya enumeration if the above mentioned labeled necklace problem is solved.
The row length sequence for this array a(n,k) is A000040(n) (n-th prime number), [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...].
The rows of this signed array are symmetric: a(n,k) = a(n,p(n)-1-k), n >= 2, k = 0..(p(n)-1)/2. See the explicit formula below.
The formulas for a(n,k), given below, produces in fact integers.
G.f. for column k, k>=0 (without leading zeros): sum(A103718(k,m)*p(n)^m,m=0..k)/k! produces for all n> pi(n) integers, where pi(n):=A000720(n), primes not exceeeding n.

Examples

			Triangle begins:
  [1, -0];
  [1, -1,  1];
  [1, -3,  5,  -3,   1];
  [1, -5, 13, -17,  13,   -5,   1];
  [1, -9, 41,-109, 191, -229, 191, -109, 41, -9, 1];
  ...
n=3: G(p(3),x)=G(5,x)=(1-3*x+5*x^2-3*x^3+1*x^4)/((1-x^5)*(1-x)^4) generates the necklace sequence A008646.
A103718(3,m), m=0..3, is [17,-17,7,-1]. Therefore (17-17*p(n)+7*p(n)^2-1*p(n)^3 )/3! gives, for n>=1, the third column [ -3,-17,-109,...].
		

Crossrefs

The unsigned column sequences are for k=0..10: A000012 (powers of 1), A040976 (primes p(n)-2), A103729 - A103914, A103915.

Formula

a(n, k) = (1 + ((-1)^k)*(p(n)-1)*binomial(p(n)-1, k))/p(n), with p(n): = A000040(n) (n-th prime).
a(n, k) = sum(A103718(k, m)*p(n)^m, m=0..k)/k!, (row polynomials of triangle A103718 with x=p(n), divided by k!).

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

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

A053618 a(n) = ceiling(binomial(n,4)/n).

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 5, 9, 14, 21, 30, 42, 55, 72, 91, 114, 140, 170, 204, 243, 285, 333, 385, 443, 506, 575, 650, 732, 819, 914, 1015, 1124, 1240, 1364, 1496, 1637, 1785, 1943, 2109, 2285, 2470, 2665, 2870, 3086, 3311, 3548, 3795, 4054, 4324
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Crossrefs

Programs

  • Magma
    [Ceiling(Binomial(n,4)/n): n in [1..60]]; // G. C. Greubel, May 16 2019
    
  • Mathematica
    CoefficientList[Series[x^4*(1-x+x^2)*(1-x+x^2+x^4)/((1-x)^3*(1-x^8)), {x,0,60}], x] (* G. C. Greubel, May 16 2019 *)
  • PARI
    concat([0,0,0], Vec(x^4*(x^2-x+1)*(x^4+x^2-x+1) / ((x-1)^4*(x+1)*(x^2+1)*(x^4+1)) + O(x^60))) \\ Colin Barker, Jan 20 2015
    
  • Sage
    [ceil(binomial(n,4)/n) for n in (1..60)] # G. C. Greubel, May 16 2019

Formula

a(n) = ( 2*n^3 - 12*n^2 + 22*n - 3 + 9*(-1)^n + 3*(1+(-1)^n)*(-1)^(n*(n-1)/2) - 6*(1 + (-1)^n)*(-1)^floor(n/4) )/48. - Luce ETIENNE, Jan 20 2015
G.f.: x^4*(1 - x + x^2)*(1 - x + x^2 + x^4)/((1-x)^3*(1-x^8)). - Colin Barker, Jan 20 2015

A032193 Number of necklaces with 8 black beads and n-8 white beads.

Original entry on oeis.org

1, 1, 5, 15, 43, 99, 217, 429, 810, 1430, 2438, 3978, 6310, 9690, 14550, 21318, 30667, 43263, 60115, 82225, 111041, 148005, 195143, 254475, 328756, 420732, 534076, 672452, 840652, 1043460, 1287036, 1577532, 1922741
Offset: 8

Views

Author

Keywords

Comments

The g.f. is Z(C_8,x)/x^8, the 8-variate cycle index polynomial for the cyclic group C_8, with substitution x[i]->1/(1-x^i), i=1,...,8. Therefore by Polya enumeration a(n+8) is the number of cyclically inequivalent 8-necklaces whose 8 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_8,x). See 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, Aug 31 2018: (Start)
The CIK[k] transform of sequence (c(n): n>=1) has generating function A_k(x) = (1/k)*Sum_{d|k} phi(d)*C(x^d)^{k/d}, where C(x) = Sum_{n>=1} c(n)*x^n is the g.f. of (c(n): n>=1).
When c(n) = 1 for all n >= 1, we get C(x) = x/(1-x) and A_k(x) = (x^k/k)*Sum_{d|k} phi(d)*(1-x^d)^{-k/d}, which is the g.f. of the number a_k(n) of necklaces of n beads of 2 colors with k of them black and n-k of them white.
Using Taylor expansions, we can easily prove that a_k(n) = (1/k)*Sum_{d|gcd(n,k)} phi(d)*binomial(n/d - 1, k/d - 1) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*binomial(n/d, k/d), which is Robert A. Russell's formula in the Mathematica code below.
For this sequence k = 8, and thus we get the formulae below.
(End)

Crossrefs

Programs

  • Mathematica
    k = 8; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[1/8*(1/(1 - x)^8 + 1/(1 - x^2)^4 + 2/(1 - x^4)^2 + 4/(1 - x^8)^1),{x, 0, 30}], x] (* Stefano Spezia, Sep 01 2018 *)

Formula

"CIK[ 8 ]" (necklace, indistinct, unlabeled, 8 parts) transform of 1, 1, 1, 1...
G.f.: (x^8)*(1-3*x+5*x^2+3*x^3-4*x^4+4*x^5+6*x^6-4*x^7+7*x^8-x^9+x^10+x^11)/((1-x)^4*(1-x^2)^2*(1-x^4)*(1-x^8)).
G.f.: 1/8*x^8*(1/(1-x)^8+1/(1-x^2)^4+2/(1-x^4)^2+4/(1-x^8)^1). - Herbert Kociemba, Oct 22 2016
a(n) = (1/8)*Sum_{d|gcd(n,8)} phi(d)*binomial(n/d - 1, 8/d - 1) = (1/n)*Sum_{d|gcd(n,8)} phi(d)*binomial(n/d, 8/d). - Petros Hadjicostas, Aug 31 2018

A267632 Triangle T(n, k) read by rows: the k-th column of the n-th row lists the number of ways to select k distinct numbers (k >= 1) from [1..n] so that their sum is divisible by n.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 4, 3, 1, 0, 1, 3, 5, 5, 3, 1, 1, 1, 3, 7, 9, 7, 3, 1, 0, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 4, 12, 22, 26, 20, 12, 5, 1, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 5, 19, 42, 66, 76, 66, 43, 19, 5, 1, 0
Offset: 1

Views

Author

Dimitri Papadopoulos, Jan 18 2016

Keywords

Comments

Row less the last element is palindrome for n=odd or n=power of 2 where n is the row number (observation-conjecture).
From Petros Hadjicostas, Jul 13 2019: (Start)
By reading carefully the proof of Lemma 5.1 (pp. 65-66) in Barnes (1959), we see that he actually proved a general result (even though he does not state it in the lemma).
According to the definition of this sequence, for 1 <= k <= n, T(n, k) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = 0 (mod n). The proof of Lemma 5.1 in Barnes (1959) implies that T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
For fixed k >= 1, the g.f. of the column (T(n, k): n >= 1) (with T(n, k) = 0 for 1 <= n < k) is (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s), which generalizes Herbert Kociemba's formula from A032801.
Barnes' (1959) formula is a special case of Theorem 4 (p. 66) in Ramanathan (1944). If R(n, k, v) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = v (mod n), then he proved that R(n, k, v) = (1/n) * Sum_{s | gcd(n,k)} (-1)^(k - (k/s)) * binomial(n/s, k/s) * C_s(v), where C_s(v) = A054535(s, v) = Sum_{d | gcd(s,v)} d * Moebius(s/d) is Ramanujan's sum (even though it was first discovered around 1900 by the Austrian mathematician R. D. von Sterneck).
Because C_s(v = 0) = phi(s), we get Barnes' (implicit) result; i.e., R(n, k, v=0) = T(n, k) for 1 <= k <= n.
For k=2, we have R(n, k=2, v=0) = T(n, k=2) = A004526(n-1) for n >= 1. For k=3, we have R(n, k=3, v=0) = T(n, k=3) = A058212(n) for n >= 1. For k=4, we have R(n, k=4, v=0) = A032801(n) for n >= 1. For k=5, we have R(n, k=5, v=0) = T(n, k=5) = A008646(n-5) for n >= 5.
The reason we have T(2*m+1, k) = A037306(2*m+1, k) = A047996(2*m+1, k) for m >= 0 and k >= 1 is the following. When n = 2*m + 1, all divisors s of gcd(n, k) are odd. In such a case, k - (k/s) is even for all k >= 1, and thus (-1)^(k - (k/s)) = 1, and thus T(n = 2*m+1, k) = (1/n) * Sum_{s | gcd(n, k)} phi(s) * binomial(n/s, k/s) = A037306(2*m+1, k) = A047996(2*m+1, k).
By summing the products of the g.f. of column k times y^k from k = 1 to k = infinity, we get the bivariate g.f. for the array: Sum_{n, k >= 1} T(n, k)*x^n*y^k = Sum_{s >= 1} (phi(s)/s) * log((1 - x^s + (-x*y)^s)/(1 - x^s)) = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
Letting y = 1 in the above bivariate g.f., we get the g.f. of the sequence (Sum_{1 <= k <= n} T(n, k): n >= 1) is -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x)^s) = -x/(1 - x) + Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m+1)), which is the g.f. of sequence A082550. Hence, sequence A082550 consists of the row sums.
There is another important interpretation of this array T(n, k) which is related to some of the references for sequence A047996, but because the discussion is too lengthy, we omit the details.
(End)

Examples

			For n = 5, there is one way to pick one number (5), two ways to pick two numbers (1+4, 2+3), two ways to pick 3 numbers (1+4+5, 2+3+5), one way to pick 4 numbers (1+2+3+4), and one way to pick 5 numbers (1+2+3+4+5) so that their sum is divisible by 5. Therefore, T(5,1) = 1, T(5,2) = 2, T(5,3) = 2, T(5,4) = 1, and T(5,5) = 1.
Table for T(n,k) begins as follows:
n\k 1 2   3    4    5    6    7    8    9   10
1   1
2   1 0
3   1 1   1
4   1 1   1    0
5   1 2   2    1    1
6   1 2   4    3    1    0
7   1 3   5    5    3    1    1
8   1 3   7    9    7    3    1    0
9   1 4  10   14   14   10    4    1    1
10  1 4  12   22   26   20   12    5    1    0
...
		

Crossrefs

Programs

  • Maple
    A267632 := proc(n,k)
        local a,msel,p;
        a := 0 ;
        for msel in combinat[choose](n,k) do
            if modp(add(p,p=msel),n) = 0 then
                a := a+1 ;
            end if;
        end do:
        a;
    end proc: # R. J. Mathar, May 15 2016
    # second Maple program:
    b:= proc(n, m, s) option remember; expand(`if`(n=0,
          `if`(s=0, 1, 0), b(n-1, m, s)+x*b(n-1, m, irem(s+n, m))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2, 0)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Aug 27 2018
  • Mathematica
    f[k_, n_] :=  Length[Select[Select[Subsets[Range[n]], Length[#] == k &], IntegerQ[Total[#]/n] &]];MatrixForm[Table[{n, Table[f[k, n], {k, n}]}, {n, 10}]] (* Dimitri Papadopoulos, Jan 18 2016 *)

Formula

T(2n+1, k) = A037306(2n+1, k) = A047996(2n+1, k).
From Petros Hadjicostas, Jul 13 2019: (Start)
T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
G.f. for column k >= 1: (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s).
Bivariate g.f.: Sum_{n, k >= 1} T(n, k)*x^n*y^k = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
(End)
Sum_{k=1..n} k * T(n,k) = A309122(n). - Alois P. Heinz, Jul 13 2019

A053731 a(n) = ceiling(binomial(n,8)/n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 15, 42, 99, 215, 429, 805, 1430, 2431, 3978, 6299, 9690, 14535, 21318, 30645, 43263, 60088, 82225, 111004, 148005, 195098, 254475, 328697, 420732, 534006, 672452, 840565, 1043460, 1286934, 1577532, 1922618
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Crossrefs

Cf. Sequences of the form ceiling(binomial(n,k)/n): A000012 (k=1), A004526 (k=2), A007997 (k=3), A008646 (k=5), A032192 (k=7), A053618 (k=4), A053643 (k=6), this sequence (k=8), A053733 (k=9).

Programs

  • Magma
    [Ceiling(Binomial(n,8)/n): n in [1..45]]; // G. C. Greubel, Sep 06 2019
    
  • Maple
    seq(ceil(binomial(n,8)/n), n=1..45); # G. C. Greubel, Sep 06 2019
  • Mathematica
    Table[Ceiling[Binomial[n, 8]/n], {n, 45}] (* G. C. Greubel, Sep 06 2019 *)
  • PARI
    vector(45, n, ceil(binomial(n,8)/n)) \\ G. C. Greubel, Sep 06 2019
    
  • Sage
    [ceil(binomial(n,8)/n) for n in (1..45)] # G. C. Greubel, Sep 06 2019
Showing 1-10 of 16 results. Next