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

A056285 Number of n-bead necklaces with exactly five different colored beads.

Original entry on oeis.org

0, 0, 0, 0, 24, 300, 2400, 15750, 92680, 510312, 2691600, 13794150, 69309240, 343501500, 1686135376, 8221437000, 39901776360, 193054016840, 932142850800, 4495236798162, 21664357535320, 104388120866100, 503044634004000, 2425003924383900, 11696087875731624
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed.

Examples

			For n=5, the 24 necklaces are A followed by the 24 permutations of BCDE.
		

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=5 of A087854.

Programs

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

Formula

a(n) = A001869(n) - 5*A001868(n) + 10*A001867(n) - 10*A000031(n) + 5.
From Robert A. Russell, Sep 26 2018: (Start)
a(n) = (k!/n) Sum_{d|n} phi(d) S2(n/d,k), where k=5 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=5 is the number of colors. (End)

A056286 Number of n-bead necklaces with exactly six different colored beads.

Original entry on oeis.org

0, 0, 0, 0, 0, 120, 2160, 23940, 211680, 1643544, 11748240, 79419180, 516257280, 3262443120, 20193277104, 123071707080, 741419995680, 4427490147480, 26264144909520, 155018841055596, 911509010154720, 5344538384445120, 31272099902089200, 182707081122261480
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed.

Examples

			For n=6, the 120 necklaces are A followed by the 120 permutations of BCDEF.
		

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=6 of A087854.

Programs

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

Formula

a(n) = A054625(n) - 6*A001869(n) + 15*A001868(n) - 20*A001867(n) + 15*A000031(n) - 6.
From Robert A. Russell, Sep 26 2018: (Start)
a(n) = (k!/n) Sum_{d|n} phi(d) S2(n/d,k), where k=6 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=6 is the number of colors. (End)

A330618 Triangle read by rows: T(n,k) is the number of n-bead necklaces using exactly k colors with no adjacent beads having the same color.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 0, 1, 3, 6, 0, 0, 6, 24, 24, 0, 1, 11, 80, 180, 120, 0, 0, 18, 240, 960, 1440, 720, 0, 1, 33, 696, 4410, 11340, 12600, 5040, 0, 0, 58, 1960, 18760, 73920, 137760, 120960, 40320, 0, 1, 105, 5508, 76368, 433944, 1209600, 1753920, 1270080, 362880
Offset: 1

Views

Author

Andrew Howroyd, Dec 20 2019

Keywords

Comments

In the case of n = 1, the single bead is considered to be cyclically adjacent to itself giving T(1,1) = 0. If compatibility with A208535 is wanted then T(1,1) should be 1.

Examples

			Triangle begins:
  0;
  0, 1;
  0, 0,  2;
  0, 1,  3,    6;
  0, 0,  6,   24,    24;
  0, 1, 11,   80,   180,   120;
  0, 0, 18,  240,   960,  1440,    720;
  0, 1, 33,  696,  4410, 11340,  12600,   5040;
  0, 0, 58, 1960, 18760, 73920, 137760, 120960, 40320;
  ...
		

Crossrefs

Column 3 is A093367.
Row sums are A330620.

Programs

  • PARI
    \\ here U(n,k) is A208535(n,k) for n > 1.
    U(n, k)={sumdiv(n, d, eulerphi(n/d)*(k-1)^d)/n - if(n%2, k-1)}
    T(n,k)={sum(j=1, k, (-1)^(k-j)*binomial(k,j)*U(n,j))}

Formula

T(n,k) = Sum_{j=1..k} (-1)^(k-j)*binomial(k,j)*A208535(n,j) for n > 1.
T(n,n) = (n-1)! for n > 1.

A238404 Number of ways a prime from A087054 can be decomposed as a sum of the form p*q+q*r+r*p where p, q and r are distinct primes (p < q < r).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 3, 4, 1, 2, 1, 1, 1, 1, 3, 2, 2, 1, 1, 8, 1, 1, 2, 3, 2, 1, 1, 3, 2, 1, 1, 3, 1, 5, 4, 3, 1, 3, 1, 1, 4, 1, 1, 3, 2, 4, 1, 1, 3, 1, 1, 2, 1, 3, 2, 2, 1, 1, 3, 2, 5, 1, 1, 7, 8, 1, 3, 4, 1, 6, 3, 2, 12, 1, 1, 1, 1, 5, 2, 1, 9, 1, 1, 1, 2, 1, 5, 1, 2, 1, 3, 3, 1, 2, 7, 1
Offset: 1

Views

Author

Jean-François Alcover, Feb 26 2014

Keywords

Examples

			A087054(5) = 71 = 3*5 + 5*7 + 7*3 = 2*3 + 3*13 + 13*2, therefore a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; A087854 = Take[Select[ Union[Total[Times @@@ Subsets[#, {2}]] & /@ Subsets[Prime[Range[nn]], {3}]], PrimeQ], nn]; r[n_, p_] := Reduce[p < q < r && p*q+q*r+r*p == n, {q, r}, Primes]; a[n_] := (For[cnt = 0; p = 2, p <= Ceiling[(n-6)/5], p = NextPrime[p], rnp = r[n, p]; If[rnp =!= False, Which[rnp[[0]] === And, Print["n = ", n, " ", {p, q, r} /. ToRules[rnp]]; cnt++, rnp[[0]] === Or, Print["n = ", n, " ", {p, q, r} /. {ToRules[rnp]}]; cnt += Length[rnp], True, Print["error: n = ", n, " ", rnp]]]]; cnt); Reap[Do[ap = a[p]; If[ap > 0, Sow[ap]], {p, A087854}]][[2, 1]] (* after Harvey P. Dale *)

A337827 a(n) is the number of 2n-bead necklaces with exactly n different colored beads.

Original entry on oeis.org

1, 4, 91, 5106, 510312, 79419180, 17758541160, 5397245416080, 2140495978440960, 1073686615987184640, 664582969579048732800, 497566995304189676342400, 443212653988584642449548800, 463237380681508395323231270400, 561422444732790213860755013145600, 780983354978825959061219179885824000
Offset: 1

Views

Author

Yves-Loic Martin, Sep 24 2020

Keywords

Examples

			a(2) = 4, corresponding to the necklaces WBBB, WBWB, WWBB, and WWWB.
		

Crossrefs

Programs

  • Mathematica
    Table[n! * (StirlingS2[2*n, n] + 1) / (2*n), {n, 1, 16}] (* Amiram Eldar, Sep 25 2020 *)
  • PARI
    T(n,k) = (k!/n) * sumdiv(n,d, eulerphi(d) * stirling(n/d, k,2)); \\ A087854
    vector(22,n,T(2*n,n)) \\ Joerg Arndt, Sep 25 2020

Formula

a(n) = A087854(2*n,n) = (n!/(2*n)) * Sum_{d|2*n} phi(d) * S2(2*n/d, n) where S2(n,k) are the Stirling numbers of the second kind.
a(n) = (n!/(2*n))*(S2(2*n, n)+1) since S2(n, n) = 1 and S2(2*n/d, n) = 0 if d>2.

Extensions

Terms a(6) and beyond from Joerg Arndt, Sep 25 2020
Previous Showing 11-15 of 15 results.