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

A019536 Number of length n necklaces with integer entries that cover an initial interval of positive integers.

Original entry on oeis.org

1, 2, 5, 20, 109, 784, 6757, 68240, 787477, 10224812, 147512053, 2340964372, 40527565261, 760095929840, 15352212731933, 332228417657960, 7668868648772701, 188085259070219000, 4884294069438337429
Offset: 1

Views

Author

Manfred Goebel (goebel(AT)informatik.uni-tuebingen.de)

Keywords

Comments

Original name: a(n) = number of necklaces of n beads with up to n unlabeled colors.
The Moebius transform of this sequence is A060223.

Examples

			a(3) = 5 since there are the following length 3 words up to rotation:
     111,  112, 122, 123, 132.
a(4) = 20 since there are the following length 4 words up to rotation:
     1111,
     1112, 1122, 1212, 1222,
     1123, 1132, 1213, 1223, 1232, 1233, 1322, 1323, 1332,
     1234, 1243, 1324, 1342, 1423, 1432.
		

Crossrefs

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"];
    mult[li:{__Integer}] := Multinomial @@ Length /@ Split[Sort[li]];
    neck[li:{__Integer}] := Module[{n, d}, n=Plus @@ li; d=n-First[li];Fold[ #1+(EulerPhi[ #2]*(n/#2)!)/Times @@ ((li/#2)!)&, 0, Divisors[GCD @@ li]]/n];
    Table[(mult /@ Partitions[n]).(neck /@ Partitions[n]), {n, 24}]
    (* second program: *)
    a[n_] := Sum[DivisorSum[n, EulerPhi[#]*StirlingS2[n/#, k] k! &]/n, {k, 1, n}];
    Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Mar 31 2016, after Philippe Deléham *)
  • PARI
    a(n) = sum(k=1, n, sumdiv(n, d, eulerphi(d)*stirling(n/d, k, 2)*k!)/n); \\ Michel Marcus, Mar 31 2016

Formula

See Mathematica code.
a(n) ~ (n-1)! / (2 * log(2)^(n+1)). - Vaclav Kotesovec, Jul 21 2019
From Petros Hadjicostas, Aug 19 2019: (Start)
The first formula is due to Philippe Deléham from the Crossrefs (see also the programs below). The second one follows easily from the first one. The third one follows from the second one using the associative property of Dirichlet convolutions.
a(n) = Sum_{k = 1..n} (k!/n) * Sum_{d|n} phi(d) * S2(n/d, k), where S2(n, k) = Stirling numbers of 2nd kind (A008277).
a(n) = (1/n) * Sum_{d|n} phi(d) * A000670(n/d).
a(n) = Sum_{d|n} A060223(d).
(End)
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = (1/n)*Sum_{k=1..n} A000670(gcd(n,k)).
a(n) = (1/n)*Sum_{k=1..n} A000670(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)

Extensions

Edited by Wouter Meeussen, Aug 06 2002
Corrected by T. D. Noe, Oct 31 2006
Edited by Andrew Howroyd, Aug 19 2019

A152175 Triangle read by rows: T(n,k) is the number of k-block partitions of an n-set up to rotations.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 2, 1, 1, 7, 18, 13, 3, 1, 1, 9, 43, 50, 20, 3, 1, 1, 19, 126, 221, 136, 36, 4, 1, 1, 29, 339, 866, 773, 296, 52, 4, 1, 1, 55, 946, 3437, 4281, 2303, 596, 78, 5, 1, 1, 93, 2591, 13250, 22430, 16317, 5817, 1080, 105, 5, 1, 1, 179, 7254, 51075, 115100, 110462, 52376, 13299, 1873, 147, 6, 1
Offset: 1

Views

Author

Vladeta Jovovic, Nov 27 2008

Keywords

Comments

Number of n-bead necklace structures using exactly k different colored beads. Turning over the necklace is not allowed. Permuting the colors does not change the structure. - Andrew Howroyd, Apr 06 2017

Examples

			Triangle begins with T(1,1):
  1;
  1,   1;
  1,   1,     1;
  1,   3,     2,      1;
  1,   3,     5,      2,      1;
  1,   7,    18,     13,      3,      1;
  1,   9,    43,     50,     20,      3,      1;
  1,  19,   126,    221,    136,     36,      4,      1;
  1,  29,   339,    866,    773,    296,     52,      4,     1;
  1,  55,   946,   3437,   4281,   2303,    596,     78,     5,    1;
  1,  93,  2591,  13250,  22430,  16317,   5817,   1080,   105   , 5,   1;
  1, 179,  7254,  51075, 115100, 110462,  52376,  13299,  1873,  147,   6, 1;
  1, 315, 20125, 194810, 577577, 717024, 439648, 146124, 27654, 3025, 187, 6, 1;
  ...
For T(4,2)=3, the set partitions are AAAB, AABB, and ABAB.
For T(4,3)=2, the set partitions are AABC and ABAC.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Columns 2-6 are A056295, A056296, A056297, A056298, A056299.
Row sums are A084423.
Partial row sums include A000013, A002076, A056292, A056293, A056294.
Cf. A075195, A087854, A008277 (set partitions), A284949 (up to reflection), A152176 (up to rotation and reflection).
A(1,n,k) in formula is the Stirling subset number A008277.
A(2,n,k) in formula is A293181; A(3,n,k) in formula is A294201.

Programs

  • Mathematica
    (* Using recursion formula from Gilbert and Riordan:*)
    Adn[d_, n_] := Adn[d, n] = Which[0==n, 1, 1==n, DivisorSum[d, x^# &],
      1==d, Sum[StirlingS2[n, k] x^k, {k, 0, n}],
      True, Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n - 1], x] x]];
    Table[CoefficientList[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]/(x n), x],
       {n, 1, 10}] // Flatten (* Robert A. Russell, Feb 23 2018 *)
    Adnk[d_,n_,k_] := Adnk[d,n,k] = If[n>0 && k>0, Adnk[d,n-1,k]k + DivisorSum[d,Adnk[d,n-1,k-#] &], Boole[n==0 && k==0]]
    Table[DivisorSum[n,EulerPhi[#]Adnk[#,n/#,k]&]/n,{n,1,12},{k,1,n}] // Flatten (* Robert A. Russell, Oct 16 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k) = NonequivalentStructsExactly(CyclicPerms(n), k); \\ Andrew Howroyd, Oct 14 2017
    
  • PARI
    R(n) = {Mat(Col([Vecrev(p/y, n) | p<-Vec(intformal(sum(m=1, n, eulerphi(m) * subst(serlaplace(-1 + exp(sumdiv(m, d, y^d*(exp(d*x + O(x*x^(n\m)))-1)/d))), x, x^m))/x))]))}
    { my(A=R(12)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Sep 20 2019

Formula

T(n,k) = (1/n)*Sum_{d|n} phi(d)*A(d,n/d,k), where A(d,n,k) = [n==0 & k==0] + [n>0 & k>0]*(k*A(d,n-1,k) + Sum_{j|d} A(d,n-1,k-j)). - Robert A. Russell, Oct 16 2018

A254040 Number T(n,k) of primitive (= aperiodic) n-bead necklaces with colored beads of exactly k different colors; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 9, 6, 0, 0, 6, 30, 48, 24, 0, 0, 9, 89, 260, 300, 120, 0, 0, 18, 258, 1200, 2400, 2160, 720, 0, 0, 30, 720, 5100, 15750, 23940, 17640, 5040, 0, 0, 56, 2016, 20720, 92680, 211680, 258720, 161280, 40320
Offset: 0

Views

Author

Alois P. Heinz, Jan 23 2015

Keywords

Comments

Turning over the necklaces is not allowed.
With other words: T(n,k) is the number of normal Lyndon words of length n and maximum k, where a finite sequence is normal if it spans an initial interval of positive integers. - Gus Wiseman, Dec 22 2017

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0,  1;
  0, 0,  2,   2;
  0, 0,  3,   9,    6;
  0, 0,  6,  30,   48,    24;
  0, 0,  9,  89,  260,   300,   120;
  0, 0, 18, 258, 1200,  2400,  2160,   720;
  0, 0, 30, 720, 5100, 15750, 23940, 17640, 5040;
  ...
The T(4,3) = 9 normal Lyndon words of length 4 with maximum 3 are: 1233, 1323, 1332, 1223, 1232, 1322, 1123, 1132, 1213. - _Gus Wiseman_, Dec 22 2017
		

Crossrefs

Columns k=0-10 give: A000007, A063524, A001037 (for n>1), A056288, A056289, A056290, A056291, A254079, A254080, A254081, A254082.
Row sums give A060223.
Main diagonal and lower diagonal give: A000142, A074143.
T(2n,n) gives A254083.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(mobius(n/d)*k^d, d=divisors(n))/n)
        end:
    T:= (n, k)-> add(b(n, k-j)*binomial(k,j)*(-1)^j, j=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[MoebiusMu[n/d]*k^d, {d, Divisors[n]}]/n]; T[n_, k_] := Sum[b[n, k-j]*Binomial[k, j]*(-1)^j, {j, 0, k}]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 27 2015, after Alois P. Heinz *)
    LyndonQ[q_]:=q==={}||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    allnorm[n_,k_]:=If[k===0,If[n===0,{{}}, {}],Join@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Select[Subsets[Range[n-1]+1],Length[#]===k-1&]];
    Table[Length[Select[allnorm[n,k],LyndonQ]],{n,0,7},{k,0,n}] (* Gus Wiseman, Dec 22 2017 *)

Formula

T(n,k) = Sum_{j=0..k} (-1)^j * C(k,j) * A074650(n,k-j).
T(n,k) = Sum_{d|n} mu(d) * A087854(n/d, k) for n >= 1 and 1 <= k <= n. - Petros Hadjicostas, Aug 20 2019

A273891 Triangle read by rows: T(n,k) is the number of n-bead bracelets with exactly k different colored beads.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 6, 3, 1, 6, 18, 24, 12, 1, 11, 56, 136, 150, 60, 1, 16, 147, 612, 1200, 1080, 360, 1, 28, 411, 2619, 7905, 11970, 8820, 2520, 1, 44, 1084, 10480, 46400, 105840, 129360, 80640, 20160, 1, 76, 2979, 41388, 255636, 821952, 1481760, 1512000, 816480, 181440
Offset: 1

Views

Author

Marko Riedel, Jun 02 2016

Keywords

Comments

For bracelets, chiral pairs are counted as one.

Examples

			Triangle begins with T(1,1):
1;
1,  1;
1,  2,    1;
1,  4,    6,     3;
1,  6,   18,    24,     12;
1, 11,   56,   136,    150,     60;
1, 16,  147,   612,   1200,   1080,     360;
1, 28,  411,  2619,   7905,  11970,    8820,    2520;
1, 44, 1084, 10480,  46400, 105840,  129360,   80640,  20160;
1, 76, 2979, 41388, 255636, 821952, 1481760, 1512000, 816480, 181440;
For T(4,2)=4, the arrangements are AAAB, AABB, ABAB, and ABBB, all achiral.
For T(4,4)=3, the arrangements are ABCD, ABDC, and ACBD, whose chiral partners are ADCB, ACDB, and ADBC respectively. - _Robert A. Russell_, Sep 26 2018
		

Crossrefs

Row sums give A019537.
Cf. A087854 (oriented), A305540 (achiral), A305541 (chiral).

Programs

  • Mathematica
    (* t = A081720 *) t[n_, k_] := (For[t1 = 0; d = 1, d <= n, d++, If[Mod[n, d] == 0, t1 = t1 + EulerPhi[d]*k^(n/d)]]; If[EvenQ[n], (t1 + (n/2)*(1 + k)*k^(n/2))/(2*n), (t1 + n*k^((n+1)/2))/(2*n)]); T[n_, k_] := Sum[(-1)^i * Binomial[k, i]*t[n, k-i], {i, 0, k-1}]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 07 2017, after Andrew Howroyd *)
    Table[k! DivisorSum[n, EulerPhi[#] StirlingS2[n/#,k]&]/(2n) + k!(StirlingS2[Floor[(n+1)/2], k] + StirlingS2[Ceiling[(n+1)/2], k])/4, {n,1,10}, {k,1,n}] // Flatten (* Robert A. Russell, Sep 26 2018 *)

Formula

T(n,k) = Sum_{i=0..k-1} (-1)^i * binomial(k,i) * A081720(n,k-i). - Andrew Howroyd, Mar 25 2017
From Robert A. Russell, Sep 26 2018: (Start)
T(n,k) = (k!/4) * (S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)) + (k!/2n) * Sum_{d|n} phi(d) * S2(n/d,k), where S2 is the Stirling subset number A008277.
G.f. for column k>1: (k!/4) * x^(2k-2) * (1+x)^2 / Product_{i=1..k} (1-i x^2) - Sum_{d>0} (phi(d)/2d) * Sum_{j} (-1)^(k-j) * C(k,j) * log(1-j*x^d).
T(n,k) = (A087854(n,k) + A305540(n,k)) / 2 = A087854(n,k) - A305541(n,k) = A305541(n,k) + A305540(n,k).
(End)

A052823 A simple grammar: cycles of pairs of sequences.

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 12, 18, 34, 58, 106, 186, 350, 630, 1180, 2190, 4114, 7710, 14600, 27594, 52486, 99878, 190744, 364722, 699250, 1342182, 2581426, 4971066, 9587578, 18512790, 35792566, 69273666, 134219794, 260301174, 505294126, 981706830, 1908881898
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Number of n-bead necklaces using exactly two different colors. - Robert A. Russell, Sep 26 2018

Crossrefs

A000031 - 2.
Column k=2 of A087854.

Programs

  • Maple
    spec := [S,{B=Sequence(Z,1 <= card),C=Prod(B,B),S= Cycle(C)},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
  • Mathematica
    k=2; Prepend[Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}],0] (* Robert A. Russell, Sep 26 2018 *)

Formula

G.f.: Sum_{j>=1} phi(j)/j*log(-(x^j-1)^2/(2*x^j-1)).
a(n) = (k!/n) Sum_{d|n} phi(d) S2(n/d,k), where k=2 is the number of colors and S2 is the Stirling subset number A008277. - Robert A. Russell, Sep 26 2018
a(n) ~ 2^n / n. - Vaclav Kotesovec, Sep 25 2019

Extensions

More terms from Alois P. Heinz, Jan 25 2015

A305540 Triangle read by rows: T(n,k) is the number of achiral loops (necklaces or bracelets) of length n using exactly k different colors.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 4, 3, 1, 6, 6, 1, 10, 21, 12, 1, 14, 36, 24, 1, 22, 93, 132, 60, 1, 30, 150, 240, 120, 1, 46, 345, 900, 960, 360, 1, 62, 540, 1560, 1800, 720, 1, 94, 1173, 4980, 9300, 7920, 2520, 1, 126, 1806, 8400, 16800, 15120, 5040, 1, 190, 3801, 24612, 71400, 103320, 73080, 20160, 1, 254, 5796, 40824, 126000, 191520, 141120, 40320
Offset: 1

Views

Author

Robert A. Russell, Jun 04 2018

Keywords

Comments

The number of achiral necklaces is equivalent to the number of achiral bracelets.

Examples

			The triangle begins with T(1,1):
1;
1,   1;
1,   2;
1,   4,     3;
1,   6,     6;
1,  10,    21,     12;
1,  14,    36,     24;
1,  22,    93,    132,     60;
1,  30,   150,    240,    120;
1,  46,   345,    900,    960,     360;
1,  62,   540,   1560,   1800,     720;
1,  94,  1173,   4980,   9300,    7920,    2520;
1, 126,  1806,   8400,  16800,   15120,    5040;
1, 190,  3801,  24612,  71400,  103320,   73080,   20160;
1, 254,  5796,  40824, 126000,  191520,  141120,   40320;
1, 382, 11973, 113652, 480060, 1048320, 1234800,  745920, 181440;
1, 510, 18150, 186480, 834120, 1905120, 2328480, 1451520, 362880;
For a(4,2)=4, the achiral loops are AAAB, AABB, ABAB, and ABBB.
		

Crossrefs

Odd rows are A019538.
Even rows are A172106.
Columns 1-6 are A057427, A027383, A056489, A056490, A056491, and A056492.

Programs

  • Mathematica
    Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] + StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 15}, {k, 1, Ceiling[(n + 1)/2]}] // Flatten
  • PARI
    T(n, k) = (k!/2)*(stirling(floor((n+1)/2), k, 2)+stirling(ceil((n+1)/2), k, 2));
    tabf(nn) = for(n=1, nn, for (k=1, ceil((n+1)/2), print1(T(n, k), ", ")); print); \\ Michel Marcus, Jul 02 2018

Formula

T(n,k) = (k!/2) * (S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)), where S2(n,k) is the Stirling subset number A008277.
T(n,k) = 2*A273891(n,k) - A087854(n,k).
G.f. for column k>1: (k!/2) * x^(2k-2) * (1+x)^2 / Product_{i=1..k} (1-i x^2). - Robert A. Russell, Sep 26 2018

A305541 Triangle read by rows: T(n,k) is the number of chiral pairs of color loops of length n with exactly k different colors.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 3, 3, 0, 0, 12, 24, 12, 0, 1, 35, 124, 150, 60, 0, 2, 111, 588, 1200, 1080, 360, 0, 6, 318, 2487, 7845, 11970, 8820, 2520, 0, 14, 934, 10240, 46280, 105840, 129360, 80640, 20160, 0, 30, 2634, 40488, 254676, 821592, 1481760, 1512000, 816480, 181440, 0, 62, 7503, 158220, 1344900, 5873760, 14658840, 21772800, 19051200, 9072000, 1814400
Offset: 1

Views

Author

Robert A. Russell, Jun 04 2018

Keywords

Comments

In other words, the number of n-bead bracelets with beads of exactly k different colors that when turned over are different from themselves. - Andrew Howroyd, Sep 13 2019

Examples

			Triangle T(n,k) begins:
  0;
  0,  0;
  0,  0,    1;
  0,  0,    3,     3;
  0,  0,   12,    24,     12;
  0,  1,   35,   124,    150,     60;
  0,  2,  111,   588,   1200,   1080,     360;
  0,  6,  318,  2487,   7845,  11970,    8820,    2520;
  0, 14,  934, 10240,  46280, 105840,  129360,   80640,  20160;
  0, 30, 2634, 40488, 254676, 821592, 1481760, 1512000, 816480, 181440;
  ...
For T(4,3)=3, the chiral pairs are AABC-AACB, ABBC-ACBB, and ABCC-ACCB.
For T(4,4)=3, the chiral pairs are ABCD-ADCB, ABDC-ACDB, and ACBD-ADBC.
		

Crossrefs

Columns 2-6 are A059076, A305542, A305543, A305544, and A305545.
Row sums are A326895.

Programs

  • Mathematica
    Table[(k!/(2n)) DivisorSum[n, EulerPhi[#] StirlingS2[n/#, k] &] - (k!/4) (StirlingS2[Floor[(n+1)/2], k] + StirlingS2[Ceiling[(n+1)/2], k]), {n, 1, 15}, {k, 1, n}] // Flatten
  • PARI
    T(n,k) = {-k!*(stirling((n+1)\2,k,2) + stirling(n\2+1,k,2))/4 + k!*sumdiv(n,d, eulerphi(d)*stirling(n/d,k,2))/(2*n)} \\ Andrew Howroyd, Sep 13 2019

Formula

T(n,k) = -(k!/4)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)) + (k!/(2 n))*Sum_{d|n} phi(d)*S2(n/d,k), where S2(n,k) is the Stirling subset number A008277.
T(n,k) = A087854(n,k) - A273891(n,k).
T(n,k) = (A087854(n,k) - A305540(n,k)) / 2.
T(n, k) = Sum_{i=0..k} (-1)^(k-i)*binomial(k,i)*A293496(n, i). - Andrew Howroyd, Sep 13 2019

A054631 Triangle read by rows: row n (n >= 1) contains the numbers T(n,k) = Sum_{d|n} phi(d)*k^(n/d)/n, for k=1..n.

Original entry on oeis.org

1, 1, 3, 1, 4, 11, 1, 6, 24, 70, 1, 8, 51, 208, 629, 1, 14, 130, 700, 2635, 7826, 1, 20, 315, 2344, 11165, 39996, 117655, 1, 36, 834, 8230, 48915, 210126, 720916, 2097684, 1, 60, 2195, 29144, 217045, 1119796, 4483815, 14913200, 43046889
Offset: 1

Views

Author

N. J. A. Sloane, Apr 16 2000, revised Mar 21 2007

Keywords

Comments

T(n,k) is the number of n-bead necklaces with up to k different colored beads. - Yves-Loic Martin, Sep 29 2020

Examples

			1;
1,  3;                                   (A000217)
1,  4,  11;                              (A006527)
1,  6,  24,   70;                        (A006528)
1,  8,  51,  208,   629;                 (A054620)
1, 14, 130,  700,  2635,  7826;          (A006565)
1, 20, 315, 2344, 11165, 39996, 117655;  (A054621)
		

Crossrefs

Cf. A054630, A054618, A054619, A087854. Lower triangle of A075195.

Programs

  • Maple
    A054631 := proc(n,k) add( numtheory[phi](d)*k^(n/d),d=numtheory[divisors](n) ) ;  %/n ; end proc: # R. J. Mathar, Aug 30 2011
  • Mathematica
    Needs["Combinatorica`"]; Table[Table[NumberOfNecklaces[n, k, Cyclic], {k, 1, n}], {n, 1, 8}] //Grid (* Geoffrey Critzer, Oct 07 2012, after code by T. D. Noe in A027671 *)
    t[n_, k_] := Sum[EulerPhi[d]*k^(n/d)/n, {d, Divisors[n]}]; Table[t[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)
  • PARI
    T(n, k) = sumdiv(n, d, eulerphi(d)*k^(n/d))/n; \\ Seiichi Manyama, Mar 10 2021
    
  • PARI
    T(n, k) = sum(j=1, n, k^gcd(j, n))/n; \\ Seiichi Manyama, Mar 10 2021

Formula

T(n,k) = Sum_{j=1..k} binomial(k,j) * A087854(n, j). - Yves-Loic Martin, Sep 29 2020
T(n,k) = (1/n) * Sum_{j=1..n} k^gcd(j, n). - Seiichi Manyama, Mar 10 2021

A056283 Number of n-bead necklaces with exactly three different colored beads.

Original entry on oeis.org

0, 0, 2, 9, 30, 91, 258, 729, 2018, 5613, 15546, 43315, 120750, 338259, 950062, 2678499, 7573350, 21480739, 61088874, 174184755, 497812638, 1425847623, 4092087522, 11765822365, 33887517870, 97756387365, 282414624746, 816999710223, 2366509198350, 6862930841141
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed.

Examples

			For n=3, the two necklaces are ABC and ACB.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Column k=3 of A087854.

Programs

  • Mathematica
    k=3; Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}] (* Robert A. Russell, Sep 26 2018 *)

Formula

a(n) = A001867(n) - 3*A000031(n) + 3.
From Robert A. Russell, Sep 26 2018: (Start)
a(n) = (k!/n) Sum_{d|n} phi(d) S2(n/d,k), where k=3 is the number of colors and S2 is the Stirling subset number A008277.
G.f.: -Sum_{d>0} (phi(d)/d) * Sum_{j} (-1)^(k-j) * C(k,j) * log(1-j x^d), where k=3 is the number of colors. (End)

A056284 Number of n-bead necklaces with exactly four different colored beads.

Original entry on oeis.org

0, 0, 0, 6, 48, 260, 1200, 5106, 20720, 81876, 318000, 1223136, 4675440, 17815020, 67769552, 257700906, 980240880, 3731753180, 14222737200, 54278580036, 207438938000, 793940475900, 3043140078000, 11681057249536, 44900438149296, 172824331826580, 666070256489680
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed.

Examples

			For n=4, the six necklaces are ABCD, ABDC, ACBD, ACDB, ADBC and ADCB.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Cf. A001868.
Column k=4 of A087854.

Programs

  • Mathematica
    k=4; Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}] (* Robert A. Russell, Sep 26 2018 *)
  • PARI
    a(n) = my(k=4);(k!/n)*sumdiv(n, d, eulerphi(d)*stirling(n/d,k,2)); \\ Michel Marcus, Sep 27 2018

Formula

a(n) = A001868(n) - 4*A001867(n) + 6*A000031(n) - 4.
From Robert A. Russell, Sep 26 2018: (Start)
a(n) = (k!/n) Sum_{d|n} phi(d) S2(n/d,k), where k=4 is the number of colors and S2 is the Stirling subset number A008277.
G.f.: -Sum_{d>0} (phi(d)/d) * Sum_{j} (-1)^(k-j) * C(k,j) * log(1-j x^d), where k=4 is the number of colors. (End)
Showing 1-10 of 15 results. Next