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

A140106 Number of noncongruent diagonals in a regular n-gon.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37
Offset: 1

Views

Author

Andrew McFarland, Jun 03 2008

Keywords

Comments

Number of double-stars (diameter 3 trees) with n nodes. For n >= 3, number of partitions of n-2 into two parts. - Washington Bomfim, Feb 12 2011
Number of roots of the n-th Bernoulli polynomial in the left half-plane. - Michel Lagneau, Nov 08 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part non-strict integer partitions of n - 1. The Heinz numbers of these partitions are given by A285508. The version for partitions of any length is A047967, with Heinz numbers A013929. The a(4) = 1 through a(15) = 6 partitions are (A = 10, B = 11, C = 12):
111 211 221 222 322 332 333 433 443 444 544 554
311 411 331 422 441 442 533 552 553 644
511 611 522 622 551 633 661 662
711 811 722 822 733 833
911 A11 922 A22
B11 C11
(End)

Examples

			The square (n=4) has two congruent diagonals; so a(4)=1. The regular pentagon also has congruent diagonals; so a(5)=1. Among all the diagonals in a regular hexagon, there are two noncongruent ones; hence a(6)=2, etc.
		

Crossrefs

A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.
Essentially the same as A004526.

Programs

  • Magma
    A140106:= func< n | n eq 1 select 0 else Floor((n-2)/2) >;
    [A140106(n): n in [1..80]]; // G. C. Greubel, Feb 10 2023
    
  • Maple
    with(numtheory): for n from 1 to 80 do:it:=0:
    y:=[fsolve(bernoulli(n,x) , x, complex)] : for m from 1 to nops(y) do : if Re(y[m])<0 then it:=it+1:else fi:od: printf(`%d, `,it):od:
  • Mathematica
    a[1]=0; a[n_?OddQ] := (n-3)/2; a[n_] := n/2-1; Array[a, 100] (* Jean-François Alcover, Nov 17 2015 *)
  • PARI
    a(n)=if(n>1,n\2-1,0) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    def A140106(n): return n-2>>1 if n>1 else 0 # Chai Wah Wu, Sep 18 2023
  • SageMath
    def A140106(n): return 0 if (n==1) else (n-2)//2
    [A140106(n) for n in range(1,81)] # G. C. Greubel, Feb 10 2023
    

Formula

a(n) = floor((n-2)/2), for n > 1, otherwise 0. - Washington Bomfim, Feb 12 2011
G.f.: x^4/(1-x-x^2+x^3). - Colin Barker, Jan 31 2012
a(n) = floor(A129194(n-1)/A022998(n)), for n > 1. - Paul Curtz, Jul 23 2017
a(n) = A001399(n-3) - A001399(n-6). Compare to A007997(n) = A001399(n-3) + A001399(n-6). - Gus Wiseman, Oct 17 2020

Extensions

More terms from Joseph Myers, Sep 05 2009

A000741 Number of compositions of n into 3 ordered relatively prime parts.

Original entry on oeis.org

0, 0, 1, 3, 6, 9, 15, 18, 27, 30, 45, 42, 66, 63, 84, 84, 120, 99, 153, 132, 174, 165, 231, 180, 270, 234, 297, 270, 378, 276, 435, 360, 450, 408, 540, 414, 630, 513, 636, 552, 780, 558, 861, 690, 828, 759, 1035, 744, 1113, 870, 1104, 972, 1326, 945, 1380, 1116, 1386, 1218
Offset: 1

Views

Author

Keywords

Examples

			From _Gus Wiseman_, Oct 14 2020: (Start)
The a(3) = 1 through a(8) = 18 triples:
  (1,1,1)  (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)  (1,1,6)
           (1,2,1)  (1,2,2)  (1,2,3)  (1,2,4)  (1,2,5)
           (2,1,1)  (1,3,1)  (1,3,2)  (1,3,3)  (1,3,4)
                    (2,1,2)  (1,4,1)  (1,4,2)  (1,4,3)
                    (2,2,1)  (2,1,3)  (1,5,1)  (1,5,2)
                    (3,1,1)  (2,3,1)  (2,1,4)  (1,6,1)
                             (3,1,2)  (2,2,3)  (2,1,5)
                             (3,2,1)  (2,3,2)  (2,3,3)
                             (4,1,1)  (2,4,1)  (2,5,1)
                                      (3,1,3)  (3,1,4)
                                      (3,2,2)  (3,2,3)
                                      (3,3,1)  (3,3,2)
                                      (4,1,2)  (3,4,1)
                                      (4,2,1)  (4,1,3)
                                      (5,1,1)  (4,3,1)
                                               (5,1,2)
                                               (5,2,1)
                                               (6,1,1)
(End)
		

References

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

Crossrefs

A000010 is the length-2 version.
A000217(n-2) does not require relative primality.
A000740 counts these compositions of any length.
A000742 is the length-4 version.
A000837 counts relatively prime partitions.
A023023 is the unordered version.
A101271 is the strict case.
A101391 has this as column k = 3.
A284825*6 is the pairwise non-coprime case.
A291166 intersected with A014311 ranks these compositions.
A337461 is the pairwise coprime instead of relatively prime version.
A337603 counts length-3 compositions whose distinct parts are pairwise coprime.
A337604 is the pairwise non-coprime instead of relatively prime version.

Programs

  • Maple
    with(numtheory):
    mobtr:= proc(p)
              proc(n) option remember;
                add(mobius(n/d)*p(d), d=divisors(n))
              end
            end:
    A000217:= n-> n*(n+1)/2:
    a:= mobtr(n-> A000217(n-2)):
    seq(a(n), n=1..58);  # Alois P. Heinz, Feb 08 2011
  • Mathematica
    mobtr[p_] := Module[{f}, f[n_] := f[n] = Sum[MoebiusMu[n/d]*p[d], {d, Divisors[n]}]; f]; A000217[n_] := n*(n+1)/2; a = mobtr[A000217[#-2]&]; Table[a[n], {n, 1, 58}] (* Jean-François Alcover, Mar 12 2014, after Alois P. Heinz *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],GCD@@#==1&]],{n,0,30}] (* Gus Wiseman, Oct 14 2020 *)

Formula

Moebius transform of A000217(n-2).
G.f.: 1 + Sum_{n>=1} a(n)*x^n/(1 - x^n) = (1 - 3*x + 3*x^2)/(1 - x)^3. - Ilya Gutkovskiy, Apr 26 2017

Extensions

Edited by Alois P. Heinz, Feb 08 2011

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

A209032 T(n,k) is the number of n-bead necklaces labeled with numbers -k..k allowing reversal, with sum zero and first differences in -k..k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 3, 4, 6, 2, 1, 3, 5, 12, 11, 4, 1, 4, 7, 23, 34, 33, 6, 1, 4, 10, 38, 88, 144, 86, 13, 1, 5, 12, 60, 187, 471, 576, 278, 21, 1, 5, 15, 88, 358, 1237, 2517, 2613, 873, 45, 1, 6, 19, 125, 625, 2798, 8235, 14611, 11841, 2938, 83, 1, 6, 22, 170, 1023
Offset: 1

Views

Author

R. H. Hardin, Mar 04 2012

Keywords

Comments

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
..2...6...12....23....38.....60.....88.....125.....170.....226.....292......371
..2..11...34....88...187....358....625....1023....1584....2355....3374.....4700
..4..33..144...471..1237...2798...5648...10483...18174...29863...46918....71037
..6..86..576..2517..8235..22249..52208..110285..214440..390344..672932..1108883
.13.278.2613.14611.58524.186765.505857.1210780.2631514.5293759.9995616.17902216

Examples

			Some solutions for n=6, k=6:
.-4...-3...-2...-4...-2...-5...-3...-2...-5...-6...-2...-3...-3...-3...-4...-3
.-2....1...-1....2...-1...-5...-1...-1...-1...-2...-1...-1...-3...-3...-4....1
..2...-2...-1...-3....0...-1...-1....0....5....3....0....3...-3...-1...-1...-2
.-1....1....2....0...-1....5....1....3....2....5...-1...-1....1....2....4....3
..3....1....3....3....0....6....5...-1...-1....0....4....3....5....4....4....0
..2....2...-1....2....4....0...-1....1....0....0....0...-1....3....1....1....1
		

Crossrefs

Row 2 is A004526(n+2).
Row 3 is A007997(n+5).
Row 4 is A084570.

Formula

Empirical for row n:
n=2: a(k) = a(k-1) + a(k-2) - a(k-3).
n=3: a(k) = 2*a(k-1) - a(k-2) + a(k-3) - 2*a(k-4) + a(k-5).
n=4: a(k) = 3*a(k-1) - 2*a(k-2) - 2*a(k-3) + 3*a(k-4) - a(k-5).
n=5: a(k) = 2*a(k-1) - 2*a(k-3) + 2*a(k-4) - a(k-5) - 2*a(k-6) + 2*a(k-7) + a(k-8) - 2*a(k-9) + 2*a(k-10) - 2*a(k-12) + a(k-13).

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

A128422 Projective plane crossing number of K_{4,n}.

Original entry on oeis.org

0, 0, 0, 2, 4, 6, 10, 14, 18, 24, 30, 36, 44, 52, 60, 70, 80, 90, 102, 114, 126, 140, 154, 168, 184, 200, 216, 234, 252, 270, 290, 310, 330, 352, 374, 396, 420, 444, 468, 494, 520, 546, 574, 602, 630, 660, 690, 720, 752, 784, 816, 850, 884, 918, 954, 990, 1026
Offset: 1

Views

Author

Eric W. Weisstein, Mar 02 2007

Keywords

Comments

From Gus Wiseman, Oct 15 2020: (Start)
Also the number of 3-part compositions of n that are neither strictly increasing nor weakly decreasing. The set of numbers k such that row k of A066099 is such a composition is the complement of A333255 (strictly increasing) and A114994 (weakly decreasing) in A014311 (triples). The a(4) = 2 through a(9) = 14 compositions are:
(1,1,2) (1,1,3) (1,1,4) (1,1,5) (1,1,6) (1,1,7)
(1,2,1) (1,2,2) (1,3,2) (1,3,3) (1,4,3) (1,4,4)
(1,3,1) (1,4,1) (1,4,2) (1,5,2) (1,5,3)
(2,1,2) (2,1,3) (1,5,1) (1,6,1) (1,6,2)
(2,3,1) (2,1,4) (2,1,5) (1,7,1)
(3,1,2) (2,2,3) (2,2,4) (2,1,6)
(2,3,2) (2,3,3) (2,2,5)
(2,4,1) (2,4,2) (2,4,3)
(3,1,3) (2,5,1) (2,5,2)
(4,1,2) (3,1,4) (2,6,1)
(3,2,3) (3,1,5)
(3,4,1) (3,2,4)
(4,1,3) (3,4,2)
(5,1,2) (3,5,1)
(4,1,4)
(4,2,3)
(5,1,3)
(6,1,2)
(End)

Crossrefs

A007997 counts the complement.
A337482 counts these compositions of any length.
A337484 is the non-strict/non-strict version.
A000009 counts strictly increasing compositions, ranked by A333255.
A000041 counts weakly decreasing compositions, ranked by A114994.
A001523 counts unimodal compositions (strict: A072706).
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A225620 ranks weakly increasing compositions.
A333149 counts neither increasing nor decreasing strict compositions.
A333256 ranks strictly decreasing compositions.
A337483 counts 3-part weakly increasing or weakly decreasing compositions.

Programs

  • Mathematica
    Table[Floor[((n - 2)^2 + (n - 2))/3], {n, 1, 100}] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2012 *)
    Table[Ceiling[n^2/3] - n, {n, 20}] (* Eric W. Weisstein, Sep 07 2018 *)
    Table[(3 n^2 - 9 n + 4 - 4 Cos[2 n Pi/3])/9, {n, 20}] (* Eric W. Weisstein, Sep 07 2018 *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 0, 0, 2, 4, 6}, 20] (* Eric W. Weisstein, Sep 07 2018 *)
    CoefficientList[Series[-2 x^3/((-1 + x)^3 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 07 2018 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],!Less@@#&&!GreaterEqual@@#&]],{n,15}] (* Gus Wiseman, Oct 15 2020 *)
  • PARI
    a(n)=(n-1)*(n-2)\3 \\ Charles R Greathouse IV, Jun 06 2013

Formula

a(n) = floor(n/3)*(2n-3(floor(n/3)+1)).
a(n) = ceiling(n^2/3) - n. - Charles R Greathouse IV, Jun 06 2013
G.f.: -2*x^4 / ((x-1)^3*(x^2+x+1)). - Colin Barker, Jun 06 2013
a(n) = floor((n - 1)(n - 2) / 3). - Christopher Hunt Gribble, Oct 13 2009
a(n) = 2*A001840(n-3). - R. J. Mathar, Jul 21 2015
a(n) = A000217(n-2) - A001399(n-6) - A001399(n-3). - Gus Wiseman, Oct 15 2020
Sum_{n>=4} 1/a(n) = 10/3 - Pi/sqrt(3). - Amiram Eldar, Sep 27 2022

A000933 Genus of complete graph on n nodes.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 6, 8, 10, 11, 13, 16, 18, 20, 23, 26, 29, 32, 35, 39, 43, 46, 50, 55, 59, 63, 68, 73, 78, 83, 88, 94, 100, 105, 111, 118, 124, 130, 137, 144, 151, 158, 165, 173, 181, 188, 196, 205, 213, 221, 230, 239, 248, 257, 266, 276, 286, 295, 305
Offset: 1

Views

Author

Keywords

Comments

(1+x)*(1+x^3)*(1+x^5)/((1-x^2)*(1-x^4)*(1-x^6)) is the Poincaré series [or Poincare series] (or Molien series) for symmetric invariants in F_2(b_1, b_2, ... b_n) ⊗ E(e_1, e_2, ... e_n) with b_i 2-dimensional, e_i one-dimensional and the permutation action of S_n, in the case n=3.

Examples

			a(1)=a(2)=a(3)=a(4)=0 because K_4 is planar. a(5)=a(6)=a(7)=1 because K_7 can be embedded on the torus of genus 1.
G.f. = x^5 + x^6 + x^7 + 2*x^8 + 3*x^9 + 4*x^10 + 5*x^11 + 6*x^12 + 8*x^13 + ...
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 200
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see I(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007997.

Programs

  • Magma
    [n le 2 select 0 else Ceiling(Binomial(n-3,2)/6): n in [1..70]]; // G. C. Greubel, Dec 08 2022
    
  • Maple
    A000933:=-z**4*(1-z+z**2-z**3+z**4)/(z**2+z+1)/(1+z**2)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[x^5(1+x^5)/((1-x)(1-x^3)(1-x^4)), {x, 0, 70}], x] (* Harvey P. Dale, Dec 18 2011 *)
    Join[{0, 0}, LinearRecurrence[{2, -2, 3, -3, 2, -2, 1}, {0, 0, 1, 1, 1, 2, 3}, 70]] (* Harvey P. Dale, Dec 18 2011 *)
    Join[{0, 0}, Table[Ceiling[(n - 3) (n - 4)/12], {n, 3, 20}]] (* Eric W. Weisstein, Jan 19 2018 *)
  • PARI
    {a(n) = if( n<3, 0, ceil((n-3) * (n-4) / 12))}; /* Michael Somos, Aug 24 2005 */
    
  • SageMath
    [0,0]+[ceil(binomial(n-3,2)/6) for n in range(3,71)] # G. C. Greubel, Dec 08 2022

Formula

Euler transform of length 10 sequence [ 1, 0, 1, 1, 1, 0, 0, 0, 0, -1]. - Michael Somos, Aug 24 2005
G.f.: x^5*(1+x^5)/((1-x)*(1-x^3)*(1-x^4)).
a(n) = ceiling ( (n-3)*(n-4)/12 ) if n>=3.
a(n) = 2*a(n-1) - 2*a(n-2) + 3*a(n-3) - 3*a(n-4) + 2*a(n-5) - 2*a(n-6) + a(n-7) for n >= 10. - Harvey P. Dale, Dec 18 2011
G.f.: x^5*(1-x+x^2+x^4-x^3) / ((1+x^2) * (1+x+x^2) * (1-x)^3). - R. J. Mathar, Dec 18 2014
a(n) = (49 + 3*(n - 7)*n - 9*cos(n*Pi/2) - 4*cos(2*n*Pi/3) + 9*sin(n*Pi/2) - 4*sqrt(3)*sin(2*n*Pi/3))/36 for n > 2. - Stefano Spezia, Dec 14 2021

A003050 Number of primitive sublattices of index n in hexagonal lattice: triples x,y,z from Z/nZ with x+y+z = 0, discarding any triple that can be obtained from another by multiplying by a unit and permuting.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 3, 4, 3, 4, 3, 6, 4, 5, 6, 6, 4, 7, 5, 8, 8, 7, 5, 12, 6, 8, 7, 10, 6, 14, 7, 10, 10, 10, 10, 14, 8, 11, 12, 16, 8, 18, 9, 14, 14, 13, 9, 20, 11, 16, 14, 16, 10, 19, 14, 20, 16, 16, 11, 28, 12, 17, 18, 18, 16, 26, 13, 20, 18, 26, 13, 28
Offset: 1

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
Also the number of triangles with vertices on points of the hexagonal lattice that have area equal to n/2. - Amihay Hanany, Oct 15 2009 [Here the area is measured in the units of the lattice unit cell area; since the number of the triangles of different shapes with the same half-integral area is infinite, the triangles are probably counted up to the equivalence relation defined in the Davey, Hanany and Rak-Kyeong Seong paper. Also, this comment probably belongs to A003051, not here. - Andrey Zabolotskiy, Mar 10 2018 and Jul 04 2019]
Also number of 2n-vertex connected cubic vertex-transitive graphs which are Cayley graphs for a dihedral group [Potočnik et al.]. - N. J. A. Sloane, Apr 19 2014

Examples

			For n = 6 the 3 primitive triples are 510, 411, 321.
		

References

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

Crossrefs

Cf. A003051 (not only primitive sublattices), A001615, A006984, A007997, A048259, A054345, A154272, A157235.

Programs

  • Mathematica
    Join[{1}, Table[p=Transpose[FactorInteger[n]][[1]]; If[Mod[n,2]==0 || Mod[n,9]==0, c1=0, c1=Product[(1+JacobiSymbol[p[[i]],3]), {i,Length[p]}]]; c2={2,1,0,1,1,1,0,1}[[1+Mod[n,8]]]; n*Product[(1+1/p[[i]]), {i, Length[p]}]/6+c1/3+2^(Length[p]-2+c2), {n,2,100}]] (* T. D. Noe, Oct 18 2009 *)

Formula

Let n = Product_{i=1..w} p_i^e_i. Then a(n) = (1/6)*n*Product_{i=1..w} (1 + 1/p_i) + (C_1)/3 + 2^(w-2+C_2),
where C_1 = 0 if 2|n or 9|n, = Product_{i=1..w, p_i > 3} (1 + Legendre(p_i, 3)) otherwise,
and C_2 = 2 if n == 0 (mod 8), 1 if n == 1, 3, 4, 5, 7 (mod 8), 0 if n == 2, 6 (mod 8).

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
Showing 1-10 of 28 results. Next