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 21-30 of 32 results. Next

A321791 Table read by descending antidiagonals: T(n,k) is the number of unoriented cycles (bracelets) of length n using up to k available colors.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 4, 1, 0, 1, 5, 10, 10, 6, 1, 0, 1, 6, 15, 20, 21, 8, 1, 0, 1, 7, 21, 35, 55, 39, 13, 1, 0, 1, 8, 28, 56, 120, 136, 92, 18, 1, 0, 1, 9, 36, 84, 231, 377, 430, 198, 30, 1, 0
Offset: 0

Views

Author

Robert A. Russell, Dec 18 2018

Keywords

Examples

			Table begins with T(0,0):
  1 1  1    1     1      1       1        1        1         1         1 ...
  0 1  2    3     4      5       6        7        8         9        10 ...
  0 1  3    6    10     15      21       28       36        45        55 ...
  0 1  4   10    20     35      56       84      120       165       220 ...
  0 1  6   21    55    120     231      406      666      1035      1540 ...
  0 1  8   39   136    377     888     1855     3536      6273     10504 ...
  0 1 13   92   430   1505    4291    10528    23052     46185     86185 ...
  0 1 18  198  1300   5895   20646    60028   151848    344925    719290 ...
  0 1 30  498  4435  25395  107331   365260  1058058   2707245   6278140 ...
  0 1 46 1219 15084 110085  563786  2250311  7472984  21552969  55605670 ...
  0 1 78 3210 53764 493131 3037314 14158228 53762472 174489813 500280022 ...
For T(3,3)=10, the unoriented cycles are 9 achiral (AAA, AAB, AAC, ABB, ACC, BBB, BBC, BCC, CCC) and 1 chiral pair (ABC-ACB).
		

Crossrefs

Cf. A075195 (oriented), A293496(chiral), A284855 (achiral).
Cf. A051137 (ascending antidiagonals).
Columns 0-6 are A000007, A000012, A000029, A027671, A032275, A032276, and A056341.
Main diagonal gives A081721.

Programs

  • Mathematica
    Table[If[k>0, DivisorSum[k, EulerPhi[#](n-k)^(k/#)&]/(2k) + ((n-k)^Floor[(k+1)/2]+(n-k)^Ceiling[(k+1)/2])/4, 1], {n, 0, 12}, {k, 0, n}] // Flatten

Formula

T(n,k) = [n==0] + [n>0] * (k^floor((n+1)/2) + k^ceiling((n+1)/2)) / 4 + (1/(2*n)) * Sum_{d|n} phi(d) * k^(n/d).
T(n,k) = (A075195(n,k) + A284855(n,k)) / 2.
T(n,k) = A075195(n,k) - A293496(n,k) = A293496(n,k) + A284855(n,k).
Linear recurrence for row n: T(n,k) = Sum_{j=0..n} -binomial(j-n-1,j+1) * T(n,k-1-j) for k >= n + 1.
O.g.f. for column k >= 0: Sum_{n>=0} T(n,k)*x^n = 3/4 + (1 + k*x)^2/(4*(1 - k*x^2)) - (1/2) * Sum_{d >= 1} (phi(d)/d) * log(1 - k*x^d). - Petros Hadjicostas, Feb 07 2021

A054620 Number of ways to color vertices of a pentagon using <= n colors, allowing only rotations.

Original entry on oeis.org

0, 1, 8, 51, 208, 629, 1560, 3367, 6560, 11817, 20008, 32219, 49776, 74269, 107576, 151887, 209728, 283985, 377928, 495235, 640016, 816837, 1030744, 1287287, 1592544, 1953145, 2376296, 2869803, 3442096, 4102253, 4860024
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Crossrefs

Programs

Formula

a(n) = (n^5+4*n)/5 = n*(n^2-2*n+2)*(n^2+2*n+2)/5.
G.f.: x*(1+2*x+18*x^2+2*x^3+x^4) / (x-1)^6 . - R. J. Mathar, Aug 30 2011
a(n) = -a(-n). - Bruno Berselli, Aug 31 2011

A054621 Number of ways to color vertices of a heptagon using <= n colors, allowing only rotations.

Original entry on oeis.org

0, 1, 20, 315, 2344, 11165, 39996, 117655, 299600, 683289, 1428580, 2783891, 5118840, 8964085, 15059084, 24408495, 38347936, 58619825, 87460020, 127695979, 182857160, 257298381, 356336860, 486403655, 655210224, 871930825, 1147401476, 1494336195, 1927561240
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Comments

Length-7 necklaces with n kinds of beads. - Vincenzo Librandi Apr 30 2012

Crossrefs

Cf. A054622. Row 7 of A075195.

Programs

  • Magma
    I:=[0, 1, 20, 315, 2344, 11165, 39996, 117655]; [n le 8 select I[n] else 8*Self(n-1)-28*Self(n-2)+56*Self(n-3)-70*Self(n-4)+56*Self(n-5)-28*Self(n-6)+8*Self(n-7)-Self(n-8): n in [1..30]]; // Vincenzo Librandi, Apr 30 2012
  • Maple
    a:=proc(n) option remember:
    if n=0 then 0 elif n=1 then 1 elif n=2 then 20 elif n=3 then 315 elif n=4 then 2344 elif n=5 then 11165 elif n=6 then 39996 elif n=7 then 117655 elif n=8 then 299600 else
    8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+8*a(n-7)-a(n-8): fi: end: seq(a(n), n=0..50); # Wesley Ivan Hurt, Sep 15 2015
  • Mathematica
    CoefficientList[Series[x*(1+12*x+183*x^2+328*x^3+183*x^4+ 12*x^5+x^6)/(x-1)^8,{x,0,33}],x] (* Vincenzo Librandi, Apr 30 2012 *)

Formula

a(n) = (1/7) * Sum_{d|7} phi(d)*n^(7/d) = (1/7) * (n^7 + 6*n). [corrected by Klaus Wagner, Sep 15 2015]
G.f.: x*(1+12*x+183*x^2+328*x^3+183*x^4+12*x^5+x^6) / (1-x)^8. - R. J. Mathar, Aug 30 2011
a(n) = 8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+8*a(n-7)-a(n-8), n>7. - Wesley Ivan Hurt, Sep 15 2015

Extensions

Edited by Christian G. Bower, Sep 07 2002

A054622 Number of ways to color vertices of an octagon using <= n colors, allowing only rotations.

Original entry on oeis.org

0, 1, 36, 834, 8230, 48915, 210126, 720916, 2097684, 5381685, 12501280, 26796726, 53750346, 101969959, 184478490, 320367720, 536879176, 871980201, 1377508284, 2122961770, 3200020110, 4727881851, 6859513606, 9788908284, 13759455900
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Comments

Length-8 necklaces with n kinds of beads. - Joerg Arndt, Apr 29 2012

Crossrefs

Row 8 of A075195.
Cf. A064621, A054623, ...

Programs

  • Magma
    I:=[0, 1, 36, 834, 8230, 48915, 210126, 720916, 2097684]; [n le 9 select I[n] else 9*Self(n-1)-36*Self(n-2)+84*Self(n-3)-126*Self(n-4)+126*Self(n-5)-84*Self(n-6)+36*Self(n-7)-9*Self(n-8)+Self(n-9): n in [1..30]]; // Vincenzo Librandi, Apr 29 2012
  • Mathematica
    CoefficientList[Series[x*(1+27*x+546*x^2+1936*x^3+ 1971*x^4+525*x^5+34*x^6)/(1-x)^9,{x,0,30}],x] (* Vincenzo Librandi, Apr 29 2012 *)

Formula

a(n) = Sum_{d|8} phi(d)*n^(8/d)/8 = n*(n+1)*(n^6-n^5+n^4-n^3+2*n^2-2*n+4)/8.
G.f.: x*(1+27*x+546*x^2+1936*x^3+1971*x^4+525*x^5+34*x^6)/(1-x)^9. - Colin Barker, Jan 29 2012
a(n) = 9*a(n-1) - 36*a(n-2) + 84*a(n-3) - 126*a(n-4) + 126*a(n-5) - 84*a(n-6) + 36*a(n-7) - 9*a(n-8) + a(n-9). Vincenzo Librandi, Apr 29 2012

Extensions

Edited by Christian G. Bower, Sep 07 2002

A054626 Number of n-bead necklaces with 7 colors.

Original entry on oeis.org

1, 7, 28, 119, 616, 3367, 19684, 117655, 720916, 4483815, 28249228, 179756983, 1153450872, 7453000807, 48444564052, 316504102999, 2077058521216, 13684147881607, 90467424361132, 599941851861751, 3989613329006536, 26597422099282535
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Examples

			G.f. = 1 + 7*x + 28*x^2 + 119*x^3 + 616*x^4 + 3367*x^5 + 19684*x^6 + ...
		

Crossrefs

Column 7 of A075195.
Cf. A054614.

Programs

  • Maple
    with(combstruct):A:=[N,{N=Cycle(Union(Z$7))},unlabeled]: seq(count(A,size=n),n=0..21); # Zerinvary Lajos, Dec 05 2007
  • Mathematica
    mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-7*x^i]/i, {i, 1, mx}], {x, 0, mx}], x] (* Herbert Kociemba, Nov 02 2016 *)
    k=7; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
  • PARI
    a(n)=if(n==0, 1, 1/n*sumdiv(n, d, eulerphi(d)*7^(n/d))); \\ Altug Alkan, Sep 21 2018

Formula

a(n) = (1/n)*Sum_{d|n} phi(d)*7^(n/d), n > 0.
G.f.: 1 - Sum_{n>=1} phi(n)*log(1 - 7*x^n)/n. - Herbert Kociemba, Nov 02 2016
a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} 7^gcd(n,k). - Ilya Gutkovskiy, Apr 17 2021

Extensions

Edited by Christian G. Bower, Sep 07 2002
a(0) corrected by Herbert Kociemba, Nov 02 2016

A054629 Number of n-bead necklaces with 10 colors.

Original entry on oeis.org

1, 10, 55, 340, 2530, 20008, 166870, 1428580, 12501280, 111111340, 1000010044, 9090909100, 83333418520, 769230769240, 7142857857190, 66666666680272, 625000006251280, 5882352941176480, 55555555611222370, 526315789473684220
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Examples

			G.f. = 1 + 10*x + 55*x^2 + 340*x^3 + 2530*x^4 + 20008*x^5 + 166870*x^6 + ...
		

Crossrefs

Column 10 of A075195.
Cf. A054617.

Programs

  • Maple
    with(combstruct):A:=[N,{N=Cycle(Union(Z$10))},unlabeled]: seq(count(A,size=n),n=0..19); # Zerinvary Lajos, Dec 05 2007
  • Mathematica
    mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-10*x^i]/i, {i, 1, mx}], {x, 0, mx}], x] (* Herbert Kociemba, Nov 02 2016 *)
    k=10; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
  • PARI
    a(n)=if(n==0, 1, 1/n*sumdiv(n, d, eulerphi(d)*10^(n/d))); \\ Altug Alkan, Sep 21 2018

Formula

a(n) = (1/n)*Sum_{d|n} phi(d)*10^(n/d) = A054617(n)/n, n > 0.
G.f.: 1 - Sum_{n>=1} phi(n)*log(1 - 10*x^n)/n. - Herbert Kociemba, Nov 02 2016
a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} 10^gcd(n,k). - Ilya Gutkovskiy, Apr 17 2021

Extensions

Edited by Christian G. Bower, Sep 07 2002
a(0) corrected by Herbert Kociemba, Nov 02 2016

A054623 Number of ways to color vertices of a 9-gon using <= n colors, allowing only rotations.

Original entry on oeis.org

0, 1, 60, 2195, 29144, 217045, 1119796, 4483815, 14913200, 43046889, 111111340, 261994491, 573309320, 1178278205, 2295672484, 4271485135, 7635498336, 13176431825, 22039922460, 35854190179, 56888890680, 88253340581, 134141026580
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Comments

Length-9 necklaces with n kinds of beads. [Vincenzo Librandi, Apr 29 2012]

Crossrefs

Row 9 of A075195.

Programs

  • Magma
    [n*(n^8+2*n^2+6)/9: n in [0..30]]; // Vincenzo Librandi, Apr 30 2012
  • Mathematica
    CoefficientList[Series[x*(1+50*x+1640*x^2+9774*x^3+17390*x^4+9774*x^5+1640*x^6+50*x^7+x^8)/(1-x)^10,{x,0,30}],x] (* Vincenzo Librandi, Apr 29 2012 *)

Formula

a(n) = Sum_{d|9} phi(d)*n^(9/d)/9.
a(n) = n*(n^8+2*n^2+6)/9.
G.f.: x*(1+50*x+1640*x^2+9774*x^3+17390*x^4+9774*x^5+1640*x^6+50*x^7+x^8)/ (1-x)^10. [Colin Barker, Jan 29 2012]
a(n) = 10*a(n-1) -45*a(n-2) +120*a(n-3) -210*a(n-4)+252*a(n-5) -210*a(n-6) +120*a(n-7) -45*a(n-8) +10*a(n-9) -a(n-10). [Vincenzo Librandi, Apr 29 2012]

Extensions

Edited by Christian G. Bower, Sep 07 2002

A054628 Number of n-bead necklaces with 9 colors.

Original entry on oeis.org

1, 9, 45, 249, 1665, 11817, 88725, 683289, 5381685, 43046889, 348684381, 2852823609, 23535840225, 195528140649, 1634056945605, 13726075481049, 115813764494505, 981010688215689, 8338590871415805, 71097458824894329, 607883273127192897
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Examples

			G.f. = 1 + 9*x + 45*x^2 + 249*x^3 + 1665*x^4 + 11817*x^5 + 88725*x^6 + ...
		

Crossrefs

Column 9 of A075195.
Cf. A054616.

Programs

  • Maple
    with(combstruct):A:=[N,{N=Cycle(Union(Z$9))},unlabeled]: seq(count(A,size=n),n=0..20); # Zerinvary Lajos, Dec 05 2007
  • Mathematica
    mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-9*x^i]/i, {i, 1, mx}], {x, 0, mx}], x] (* Herbert Kociemba, Nov 02 2016 *)
    k=9; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
  • PARI
    a(n)=if(n==0, 1, 1/n*sumdiv(n, d, eulerphi(d)*9^(n/d))); \\ Altug Alkan, Sep 21 2018

Formula

a(n) = (1/n)*Sum_{d|n} phi(d)*9^(n/d), n > 0.
G.f.: 1 - Sum_{n>=1} phi(n)*log(1 - 9*x^n)/n. - Herbert Kociemba, Nov 02 2016 [corrected by Ilya Gutkovskiy, Apr 17 2021]
a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} 9^gcd(n,k). - Ilya Gutkovskiy, Apr 17 2021

Extensions

Edited by Christian G. Bower, Sep 07 2002
a(0) corrected by Herbert Kociemba, Nov 02 2016

A213935 Triangle with entry a(n,m) giving the total number of necklaces of n beads (C_n symmetry) with n colors available for each bead, but only m distinct colors present, with m from {1, 2, ..., n} and n >= 1.

Original entry on oeis.org

1, 2, 1, 3, 6, 2, 4, 24, 36, 6, 5, 60, 300, 240, 24, 6, 180, 1820, 3900, 1800, 120, 7, 378, 9030, 42000, 50400, 15120, 720, 8, 952, 40824, 357420, 882000, 670320, 141120, 5040, 9, 2088, 169512, 2610720, 11677680, 17781120, 9313920, 1451520, 40320, 10, 4770, 673560, 17193960, 128598624, 345144240, 355622400, 136080000, 16329600, 362880
Offset: 1

Views

Author

Wolfdieter Lang, Jun 27 2012

Keywords

Comments

This triangle is obtained from the array A212360 by summing in the row number n, for n>=1, all entries related to partitions of n with the same number of parts m.
a(n,m) is the total number of necklaces of n beads (C_n symmetry) corresponding to all the color multinomials obtained from all p(n,m)=A008284(n,m) partitions of n with m parts, written in nonincreasing form, by 'exponentiation'. Therefore only m from the available n colors are present, and a(n,m) gives the number of necklaces with n beads with only m of the n available colors present, for m from 1,2,...,n, and n>=1. All of the possible color assignments are counted.
See the comments on A212359 for the Abramowitz-Stegun (A-St) order of partitions, and the 'exponentiation' to obtain multisets, used to encode color multinomials, from partitions.
The row sums of this triangle coincide with the ones of array A212360, and they are given by A056665.

Examples

			n\m 1    2      3       4       5       8      7     8 ...
1   1
2   2    1
3   3    6      2
4   4   24     36       6
5   5   60    300     240      24
6   6  180   1820    3900    1800     120
7   7  378   9030   42000   50400   15120     72
8   8  952  40824  357420  882000  670320 141120  5040
...
Row n=9:   9 2088 169512 2610720 11677680 17781120 9313920 1451520 40320.
Row n=10: 10 4770 673560 17193960 128598624 345144240 355622400 136080000 16329600 362880.
a(2,2)=1 from the color monomial c[1]^1*c[2]^1= c[1]*c[2] (from the m=2 partition [1,1] of n=2). The necklace in question is cyclic(12) (we use j for color c[j] in these examples).
a(5,3) = 120 + 180 = 300, from A212360(5,4) + A212360(5,5), because k(5,3,1)=4 and p(5,3)=2.
a(3,1) = 3 from the color monomials c[1]^3, c[2]^3 and c[3]^1. The three necklaces are cyclic(111), cyclic(222) and cyclic(333).
In general a(n,1)=n from the partition [n] providing the color signature (exponent), and the n color choices.
a(3,2) = 6 from the color signature c[.]^2 c[.]^1, (from the m=2 partition [2,1] of n=3), and there are 6 choices for the color indices. The 6 necklaces are cyclic(112), cyclic(113), cyclic(221), cyclic(223), cyclic(331) and cyclic(332).
a(3,3) = 2. The color multinomial is c[1]*c[2]*c[3] (from the m=3 partition [1,1,1]). All three available colors are used. There are two non-equivalent necklaces: cyclic(1,2,3) and cyclic(1,3,2).
a(4,2) = 24 from two color signatures c[.]^3 c[.] and c[.]^2 c[.]^2 (from the two m=2 partitions of n=4: [3,1] and [2,2]). The first one produces 4*3=12 necklaces, namely 1112, 1113, 1114, 2221, 2223, 2224, 3331, 3332, 3334, 4441, 4442 and 4443 all taken cyclically. The second color signature leads to another 2*6=12 necklaces: 1122, 1133, 1144, 2233, 2244, 3344, 1212, 1313, 1414, 2323, 2424 and 3434, all taken cyclically. Together they provide the 24 necklaces counted by a(4,2).
		

Crossrefs

Cf. A212360, A056665 (row sums). A075195 (another necklace table).

Formula

a(n,m) = Sum_{j=1..p(n,m)}A212360(n,k(n,m,1)+j-1), with k(n,m,1) the position where in the list of partitions of n in A-St order the first with m parts appears, and p(n,m) the number of partitions of n with m parts shown in the array A008284. E.g., n=5, m=3: k(5,3,1)=4, p(5,3)=2.

A319082 A(n, k) = (1/k)*Sum_{d|k} EulerPhi(d)*n^(k/d) for n >= 0 and k > 0, A(n, 0) = 0, square array read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 3, 3, 1, 0, 0, 4, 6, 4, 1, 0, 0, 5, 10, 11, 6, 1, 0, 0, 6, 15, 24, 24, 8, 1, 0, 0, 7, 21, 45, 70, 51, 14, 1, 0, 0, 8, 28, 76, 165, 208, 130, 20, 1, 0, 0, 9, 36, 119, 336, 629, 700, 315, 36, 1, 0, 0, 10, 45, 176, 616, 1560, 2635, 2344, 834, 60, 1, 0, 0, 11, 55, 249, 1044, 3367, 7826, 11165, 8230, 2195, 108, 1, 0
Offset: 0

Views

Author

Peter Luschny, Sep 10 2018

Keywords

Examples

			Array starts:
[n\k][0   1   2    3    4     5      6       7       8        9  ...]
[0]   0,  0,  0,   0,   0,    0,     0,      0,      0,       0, ...
[1]   0,  1,  1,   1,   1,    1,     1,      1,      1,       1, ...
[2]   0,  2,  3,   4,   6,    8,    14,     20,     36,      60, ...
[3]   0,  3,  6,  11,  24,   51,   130,    315,    834,    2195, ...
[4]   0,  4, 10,  24,  70,  208,   700,   2344,   8230,   29144, ...
[5]   0,  5, 15,  45, 165,  629,  2635,  11165,  48915,  217045, ...
[6]   0,  6, 21,  76, 336, 1560,  7826,  39996, 210126, 1119796, ...
[7]   0,  7, 28, 119, 616, 3367, 19684, 117655, 720916, 4483815, ...
		

References

  • D. E. Knuth, Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, Addison-Wesley, 2005.

Crossrefs

Essentially the same table as A075195.
A185651(n, k) = n*A(k, n).
Main diagonal gives A056665.
A054630(n,k) is a subtriangle for n >= 1 and 1 <= k <= n.

Programs

  • Maple
    with(numtheory):
    A := (n, k) -> `if`(k=0, 0, (1/k)*add(phi(d)*n^(k/d), d=divisors(k))):
    seq(seq(A(n-k, k), k=0..n), n=0..12);
    # Alternatively, row-wise printed as a table:
    T := (n, k) -> `if`(k=0, 0, add(n^igcd(i, k), i=1..k)/k):
    seq(lprint(seq(T(n, k), k=0..9)), n=0..7);
  • PARI
    A(n,k)=if(k==0, 0, sumdiv(k,d, eulerphi(d)*n^(k/d))/k) \\ Andrew Howroyd, Jan 05 2024
  • Sage
    def A319082(n, k):
        return 0 if k == 0 else (1/k)*sum(euler_phi(d)*n^(k//d) for d in divisors(k))
    for n in (0..7):
        print([n], [A319082(n, k) for k in (0..9)])
    

Formula

A(n, k) = (1/k)*Sum_{i=1..k} n^gcd(i, k) for k > 0.
Previous Showing 21-30 of 32 results. Next