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

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

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 9, 6, 1, 6, 30, 48, 24, 1, 12, 91, 260, 300, 120, 1, 18, 258, 1200, 2400, 2160, 720, 1, 34, 729, 5106, 15750, 23940, 17640, 5040, 1, 58, 2018, 20720, 92680, 211680, 258720, 161280, 40320, 1, 106, 5613, 81876, 510312, 1643544, 2963520, 3024000, 1632960, 362880
Offset: 1

Views

Author

Keywords

Comments

Equivalently, T(n,k) is the number of sequences (words) of length n on an alphabet of k letters where each letter of the alphabet occurs at least once in the sequence. Two sequences are considered equivalent if one can be obtained from the other by a cyclic shift of the letters. Cf. A054631 where the surjective restriction is removed. - Geoffrey Critzer, Jun 18 2013
Robert A. Russell's g.f. for column k >= 1 (in the Formula section below) can be proved by integrating both sides of the formula Sum_{n>=1} S2(n, k)*x^(n-1) = x^(k-1)/((1 - x)* (1 - 2*x) * (1 - 3*x) * ... * (1 - k*x)) w.r.t. x. A variation of this identity (valid for |x| < 1/k) can be found in the Formula section of A008277. - Petros Hadjicostas, Aug 20 2019

Examples

			The triangle begins with T(1,1):
  1;
  1,   1;
  1,   2,    2;
  1,   4,    9,     6;
  1,   6,   30,    48,     24;
  1,  12,   91,   260,    300,     120;
  1,  18,  258,  1200,   2400,    2160,     720;
  1,  34,  729,  5106,  15750,   23940,   17640,    5040;
  1,  58, 2018, 20720,  92680,  211680,  258720,  161280,   40320;
  1, 106, 5613, 81876, 510312, 1643544, 2963520, 3024000, 1632960, 362880;
  ...
For T(4,2) = 4, the necklaces are AAAB, AABB, ABAB, and ABBB.
For T(4,4) = 6, the necklaces are ABCD, ABDC, ACBD, ACDB, ADBC, and ADCB.
		

Crossrefs

Diagonals: A000142 and A074143.
Row sums: A019536.
Cf. A000010 (Euler totient phi function), A008277 (Stirling2 numbers), A075195 (table of Jablonski).

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> (k!/n) *add(phi(d) *Stirling2(n/d, k), d=divisors(n)):
    seq(seq(T(n,k), k=1..n), n=1..12);  # Alois P. Heinz, Jun 19 2013
  • Mathematica
    Table[Table[Sum[EulerPhi[d]*StirlingS2[n/d,k]k!,{d,Divisors[n]}]/n,{k,1,n}],{n,1,10}]//Grid (* Geoffrey Critzer, Jun 18 2013 *)
  • PARI
    T(n, k) = (k!/n) * sumdiv(n, d, eulerphi(d) * stirling(n/d, k, 2)); \\ Joerg Arndt, Sep 25 2020

Formula

T(n,k) = Sum_{i=0..k-1} (-1)^i * C(k,i) * A075195(n,k-i); A075195 = Jablonski's table.
T(n,k) = (k!/n) * Sum_{d|n} phi(d) * S2(n/d, k), where S2(n,k) = Stirling numbers of 2nd kind A008277.
G.f. for column k: -Sum_{d>0} (phi(d)/d) * Sum_{j = 1..k} (-1)^(k-j) * C(k,j) * log(1 - j * x^d). - Robert A. Russell, Sep 26 2018
T(n,k) = Sum_{d|n} A254040(d, k) for n, k >= 1. - Petros Hadjicostas, Aug 19 2019

Extensions

Formula section edited by Petros Hadjicostas, Aug 20 2019

A294687 Triangle read by rows: T(n,k) is the number of non-isomorphic colorings of a toroidal n X k grid using exactly five colors under translational symmetry, 1 <= k <= n.

Original entry on oeis.org

0, 0, 0, 0, 300, 92680, 0, 15750, 13794150, 8221452750, 24, 510312, 1686135376, 4495236798162, 11696087875731720, 300, 13794450, 193054017440, 2425003938178050, 30852000867277668428, 403564024914127655401650, 2400, 343501500, 21664357535320, 1317601563731383350, 82985159653854019928352, 5411356249329837891442095560
Offset: 1

Views

Author

Marko Riedel, Nov 06 2017

Keywords

Comments

Colors are not being permuted, i.e., Power Group Enumeration does not apply here.

Examples

			Triangle begins:
   0;
   0,      0;
   0,    300,      92680;
   0,  15750,   13794150,    8221452750;
  24, 510312, 1686135376, 4495236798162, 11696087875731720;
  ...
		

References

  • F. Harary and E. Palmer, Graphical Enumeration, Academic Press, 1973.

Crossrefs

Main diagonal is A376825.

Programs

  • PARI
    T(n,m)=my(k=5); k!*sumdiv(n, d, sumdiv(m, e, eulerphi(d) * eulerphi(e) * stirling(n*m/lcm(d,e), k, 2) ))/(n*m) \\ Andrew Howroyd, Oct 05 2024

Formula

T(n,k) = (Q!/(n*k))*(Sum_{d|n} Sum_{f|k} phi(d) phi(f) S(gcd(d,f)*(n/d)*(k/f), Q)) with Q=5 and S(n,k) Stirling numbers of the second kind.

A056298 Number of n-bead necklace structures using exactly five different colored beads.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 20, 136, 773, 4281, 22430, 115100, 577577, 2863227, 14051164, 68515514, 332514803, 1608800691, 7767857090, 37460388596, 180536313547, 869901397479, 4192038616700, 20208367895980
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed. Colors may be permuted without changing the necklace structure.

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 5 of A152175.

Programs

  • Mathematica
    From Robert A. Russell, May 29 2018: (Start)
    Adn[d_, n_] := Adn[d, n] = If[1==n, DivisorSum[d, x^# &],
      Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n-1], x] x]];
    Table[Coefficient[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]/n , x, 5],
      {n, 1, 40}] (* after Gilbert and Riordan *)
    Table[(1/n) DivisorSum[n, EulerPhi[#] Which[Divisible[#, 60], StirlingS2[n/#+4, 5] - 6 StirlingS2[n/#+3, 5] + 11 StirlingS2[n/#+2, 5] - 6 StirlingS2[n/#+1, 5], Divisible[#, 30], StirlingS2[n/#+4, 5] - 8 StirlingS2[n/#+3, 5] + 26 StirlingS2[n/#+2, 5] - 43 StirlingS2[n/#+1, 5] + 30 StirlingS2[n/#, 5], Divisible[#, 20], StirlingS2[n/#+4, 5] - 8 StirlingS2[n/#+3, 5] + 23 StirlingS2[n/#+2, 5] - 24 StirlingS2[n/#+1, 5], Divisible[#, 15], StirlingS2[n/#+4, 5] - 10 StirlingS2[n/#+3, 5] + 38 StirlingS2[n/#+2, 5] - 65 StirlingS2[n/#+1, 5] + 45 StirlingS2[n/#, 5], Divisible[#, 12], 4 StirlingS2[n/#+3, 5] - 24 StirlingS2[n/#+2, 5] + 44 StirlingS2[n/#+1, 5] - 24 StirlingS2[n/#, 5], Divisible[#, 10], StirlingS2[n/#+4, 5] - 10 StirlingS2[n/#+3, 5] + 38 StirlingS2[n/#+2, 5] - 61 StirlingS2[n/#+1, 5] + 30 StirlingS2[n/#, 5], Divisible[#, 6], 2 StirlingS2[n/#+3, 5] - 9 StirlingS2[n/#+2, 5] + 7 StirlingS2[n/#+1, 5] + 6 StirlingS2[n/#, 5], Divisible[#, 5], StirlingS2[n/#+4, 5] - 10 StirlingS2[n/#+3, 5] + 35 StirlingS2[n/#+2, 5] - 50 StirlingS2[n/#+1, 5] + 25 StirlingS2[n/#, 5], Divisible[#, 4], 2 StirlingS2[n/#+3, 5] - 12 StirlingS2[n/#+2, 5] + 26 StirlingS2[n/#+1, 5] - 24 StirlingS2[n/#, 5], Divisible[#, 3], 3 StirlingS2[n/#+2, 5] - 15 StirlingS2[n/#+1, 5] + 21 StirlingS2[n/#, 5], Divisible[#, 2], 3 StirlingS2[n/#+2, 5] - 11 StirlingS2[n/#+1, 5] + 6 StirlingS2[n/#, 5], True, StirlingS2[n/#, 5]] &], {n, 1, 40}]
    mx = 40; Drop[CoefficientList[Series[-Sum[(EulerPhi[d] / d) Which[
      Divisible[d, 60], Log[1 - 5x^d] - Log[1 - 4x^d], Divisible[d, 30],
      (3 Log[1 - 5x^d] - 3 Log[1 - 4x^d] + Log[1 - x^d]) / 4, Divisible[d, 20],
      (2 Log[1 - 5x^d] - 2 Log[1 - 4x^d] + Log[1 - 2x^d] - Log[1 - x^d]) / 3,
      Divisible[d, 15], (3 Log[1 - 5x^d] - 3 Log[1 - 4x^d] + 2 Log[1 - 3x^d] -
      2 Log[1 - 2x^d] + 3 Log[1 - x^d]) / 8, Divisible[d, 12],
      (4 Log[1 - 5x^d] - 5 Log[1 - 4x^d]) / 5, Divisible[d, 10],
      (5 Log[1 - 5x^d] - 5 Log[1 - 4x^d] + 4 Log[1 - 2x^d] - Log[1 - x^d]) / 12,
      Divisible[d, 6], (11 Log[1 - 5x^d] - 15 Log[1 - 4x^d] + 5 Log[1 - x^d]) /
      20, Divisible[d, 5], (5 Log[1 - 5x^d] - Log[1 - 4x^d] + 2 Log[1 - 3x^d] -
      2 Log[1 - 2x^d] + Log[1 - x^d]) / 24, Divisible[d, 4], (7 Log[1 - 5x^d] -
      10 Log[1 - 4x^d] + 5 Log[1 - 2x^d] - 5 Log[1 - x^d]) / 15,
      Divisible[d, 3], (7 Log[1 - 5x^d] - 15 Log[1 - 4x^d] + 10 Log[1 - 3x^d] -
      10 Log[1 - 2x^d] + 15 Log[1 - x^d]) / 40, Divisible[d, 2],
      (13 Log[1 - 5x^d] - 25 Log[1 - 4x^d] + 20 Log[1 - 2x^d] -
      5 Log[1 - x^d]) / 60, True, (Log[1 - 5x^d] - 5 Log[1 - 4x^d] +
      10 Log[1 - 3x^d] - 10 Log[1 - 2x^d] + 5 Log[1 - x^d]) / 120], {d, 1, mx}], {x, 0, mx}], x], 1]
    (End)

Formula

a(n) = A056293(n) - A056292(n).
From Robert A. Russell, May 29 2018: (Start)
a(n) = (1/n) * Sum_{d|n} phi(d) * ([d==0 mod 60] * (S2(n/d+4,5) -
6*S2(n/d+3,5) + 11*S2(n/d+2,5) - 6*S2(n/d+1,5)) + [d==30 mod 60] *
(S2(n/d+4,5) - 8*S2(n/d+3,5) + 26*S2(n/d+2,5) - 43*S2(n/d+1,5) +
30*S2(n/d,5)) + [d==20 mod 60 | d==40 mod 60] * (S2(n/d+4,5) -
8*S2(n/d+3,5) + 23*S2(n/d+2,5) - 24*S2(n/d+1,5)) + [d==15 mod 60 |
d==45 mod 60] * (S2(n/d+4,5) - 10*S2(n/d+3,5) + 38*S2(n/d+2,5) -
65*S2(n/d+1,5) + 45*S2(n/d,5)) + [d mod 60 in {12,24,36,48}] *
(4*S2(n/d+3,5) - 24*S2(n/d+2,5) + 44*S2(n/d+1,5) - 24*S2(n/d,5)) +
[d=10 mod 60 | d==50 mod 60] * (S2(n/d+4,5) - 10*S2(n/d+3,5) +
38*S2(n/d+2,5) - 61*S2(n/d+1,5) + 30*S2(n/d,5)) + [d mod 60 in
{6,18,42,54}] * (2*S2(n/d+3,5) - 9*S2(n/d+2,5) + 7*S2(n/d+1,5) +
6*S2(n/d,5)) + [d mod 60 in {5,25,35,55}] * (S2(n/d+4,5) -
10*S2(n/d+3,5) + 35*S2(n/d+2,5) - 50*S2(n/d+1,5) + 25*S2(n/d,5)) +
[d mod 60 in {4,8,16,28,32,44,52,56}] * (2*S2(n/d+3,5) - 12*S2(n/d+2,5) +
26*S2(n/d+1,5) - 24*S2(n/d,5)) + [d mod 60 in {3,9,21,27,33,39,51,57}] *
(3*S2(n/d+2,5) - 15*S2(n/d+1,5) + 21*S2(n/d,5)) + [d mod 60 in
{2,14,22,26,34,38,46,58}] * (3*S2(n/d+2,5) - 11*S2(n/d+1,5) +
6*S2(n/d,5)) + [d mod 60 in {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,
59}] * S2(n/d,5)), where S2(n,k) is the Stirling subset number, A008277.
G.f.: -Sum_{d>0} (phi(d) / d) * ([d==0 mod 60] * (log(1-4x^d) -
log(1-3x^d)) + [d==30 mod 60] * (3*log[1-5x^d) - 3*log(1-4x^d) +
log(1-x^d)) / 4 + [d==20 mod 60 | d==40 mod 60] * (2*log(1-5x^d) -
2*log(1-4x^d) + log(1-2x^d) - log(1-x^d)) / 3 +
[d==15 mod 60 | d==45 mod 60] * (3*log(1-5x^d) - 3*log(1-4x^d) +
2*log(1-3x^d) - 2*log(1-2x^d) + 3*log(1-x^d)) / 8 + [d mod 60 in
{12,24,36,48}] * (4*log(1-5x^d) - 5*log(1-4x^d)) / 5 + [d=10 mod 60 |
d==50 mod 60] * (5*log(1-5x^d) - 5*log(1-4x^d) + 4*log(1-2x^d) -
log(1-x^d)) / 12 + [d mod 60 in {6,18,42,54}] * (11*log(1-5x^d) -
15*log(1-4x^d) + 5*log(1-x^d)) / 20 + [d mod 60 in {5,25,35,55}] *
(5*log(1-5x^d) - log(1-4x^d) + 2*log(1-3x^d) - 2*log(1-2x^d) +
log(1-x^d)) / 24 + [d mod 60 in {4,8,16,28,32,44,52,56}] *
(7*log(1-5x^d) - 10*log(1-4x^d) + 5*log(1-2x^d) - 5*log(1-x^d)) /
15 + [d mod 60 in {3,9,21,27,33,39,51,57}] * (7*log(1-5x^d) -
15*log(1-4x^d) + 10*log(1-3x^d) - 10*log(1-2x^d) + 15*log(1-x^d)) /
40 + [d mod 60 in {2,14,22,26,34,38,46,58}] * (13*log(1-5x^d) -
25*log(1-4x^d) + 20*log(1-2x^d) - 5*log(1-x^d)) / 60 + [d mod 60 in
{1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}] * (log(1-5x^d) -
5*log(1-4x^d) + 10*log(1-3x^d) - 10*log(1-2x^d) + 5*log(1-x^d)) / 120).
(End)

A056491 Number of periodic palindromes using exactly five different symbols.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 60, 120, 960, 1800, 9300, 16800, 71400, 126000, 480060, 834120, 2968560, 5103000, 17355300, 29607600, 97567800, 165528000, 533274060, 901020120, 2855012160, 4809004200, 15050517300, 25292030400, 78417448200, 131542866000, 404936532060
Offset: 1

Views

Author

Keywords

Examples

			For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.
There are 120 permutations of the five letters used in ABACDEDC.  These 120 arrangements can be paired up with a half turn (e.g., ABACDEDC-DEDCABAC) to arrive at the 60 arrangements for n=8. - _Robert A. Russell_, Sep 26 2018
		

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. A056456.
Column 5 of A305540.

Programs

  • GAP
    a:=[0,0,0,0,0,0,0,60,120];; for n in [10..35] do a[n]:=a[n-1]+14*a[n-2]-14*a[n-3]-71*a[n-4]+71*a[n-5]+154*a[n-6]-154*a[n-7]-120*a[n-8]+120*a[n-9]; od; a; # Muniru A Asiru, Sep 26 2018
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0, 0, 0, 0, 0, 0, 0] cat Coefficients(R!(-60*x^8*(x+1)/((x-1)*(2*x-1)*(2*x+1)*(2*x^2-1)*(3*x^2-1)*(5*x^2-1)))); // G. C. Greubel, Oct 13 2018
  • Maple
    with(combinat):  a:=n->(factorial(5)/2)*(Stirling2(floor((n+1)/2),5)+Stirling2(ceil((n+1)/2),5)): seq(a(n),n=1..35); # Muniru A Asiru, Sep 26 2018
  • Mathematica
    k = 5; Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] +
    StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 40}] (* Robert A. Russell, Jun 05 2018 *)
    LinearRecurrence[{1, 14, -14, -71, 71, 154, -154, -120, 120}, {0, 0,
    0, 0, 0, 0, 0, 60, 120}, 40] (* Robert A. Russell, Sep 29 2018 *)
  • PARI
    a(n) = my(k=5); (k!/2)*(stirling(floor((n+1)/2), k, 2) + stirling(ceil((n+1)/2), k, 2)); \\ Michel Marcus, Jun 05 2018
    

Formula

a(n) = 2*A056345(n) - A056285(n).
G.f.: -60*x^8*(x+1)/((x-1)*(2*x-1)*(2*x+1)*(2*x^2-1)*(3*x^2-1)*(5*x^2-1)). - Colin Barker, Jul 08 2012
a(n) = (k!/2)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)), with k=5 different colors used and where S2(n,k) is the Stirling subset number A008277. - Robert A. Russell, Jun 05 2018
a(n) = a(n-1) + 14*a(n-2) - 14*a(n-3) - 71*a(n-4) + 71*a(n-5) + 154*a(n-6) - 154*a(n-7) - 120*a(n-8) + 120*a(n-9). - Muniru A Asiru, Sep 26 2018

A056290 Number of primitive (period n) n-bead necklaces with exactly five different colored beads.

Original entry on oeis.org

0, 0, 0, 0, 24, 300, 2400, 15750, 92680, 510288, 2691600, 13793850, 69309240, 343499100, 1686135352, 8221421250, 39901776360, 193053923860, 932142850800, 4495236287850, 21664357532920, 104388118174500, 503044634004000, 2425003910574000, 11696087875731600
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed.

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. A001692.
Column k=5 of A254040.

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:
    a:= n-> add(b(n, 5-j)*binomial(5, j)*(-1)^j, j=0..5):
    seq(a(n), n=1..30);  # Alois P. Heinz, Jan 25 2015
  • Mathematica
    b[n_, k_] := b[n, k] = If[n==0, 1, DivisorSum[n, MoebiusMu[n/#]*k^# &]/n];
    a[n_] := Sum[b[n, 5 - j]*Binomial[5, j]*(-1)^j, {j, 0, 5}];
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Jun 06 2018, after Alois P. Heinz *)

Formula

sum mu(d)*A056285(n/d) where d|n.

A056345 Number of bracelets of length n using exactly five different colored beads.

Original entry on oeis.org

0, 0, 0, 0, 12, 150, 1200, 7905, 46400, 255636, 1346700, 6901725, 34663020, 171786450, 843130688, 4110958530, 19951305240, 96528492700, 466073976900, 2247627076731, 10832193571460, 52194109216950
Offset: 1

Views

Author

Keywords

Comments

Turning over will not create a new bracelet.

Examples

			For a(5)=12, pair up the 24 permutations of BCDE, each with its reverse, such as BCDE-EDCB.  Precede the first of each pair with an A, such as ABCDE.  These are the 12 arrangements, all chiral.  If we precede the second of each pair with an A, such as AEDCB, we get the chiral partner of each. - _Robert A. Russell_, Sep 27 2018
		

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 5 of A273891.
Equals (A056285 + A056491) / 2 = A056285 - A305544 = A305544 + A056491.

Programs

  • Mathematica
    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}];
    a[n_] := T[n, 5];
    Array[a, 22] (* Jean-François Alcover, Nov 05 2017, after Andrew Howroyd *)
    k=5; 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,30}] (* Robert A. Russell, Sep 27 2018 *)

Formula

a(n) = A032276(n) - 5*A032275(n) + 10*A027671(n) - 10*A000029(n) + 5.
From Robert A. Russell, Sep 27 2018: (Start)
a(n) = (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 k=5 is the number of colors and S2 is the Stirling subset number A008277.
G.f.: (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), where k=5 is the number of colors. (End)
Showing 1-6 of 6 results.