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.

A075195 Jablonski table T(n,k) read by antidiagonals: T(n,k) = number of necklaces with n beads of k colors.

Original entry on oeis.org

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

Views

Author

Christian G. Bower, Sep 07 2002

Keywords

Comments

From Richard L. Ollerton, May 07 2021: (Start)
Here, as in A000031, turning over is not allowed.
(1/n) * Dirichlet convolution of phi(n) and k^n. (End)

Examples

			The array T(n,k) for n >= 1, k >= 1 begins:
  1,  2,   3,    4,     5,     6,      7, ...
  1,  3,   6,   10,    15,    21,     28, ...
  1,  4,  11,   24,    45,    76,    119, ...
  1,  6,  24,   70,   165,   336,    616, ...
  1,  8,  51,  208,   629,  1560,   3367, ...
  1, 14, 130,  700,  2635,  7826,  19684, ...
  1, 20, 315, 2344, 11165, 39996, 117655, ...
From _Indranil Ghosh_, Mar 25 2017: (Start)
Triangle formed when the array is read by antidiagonals:
   1;
   2,  1;
   3,  3,   1;
   4,  6,   4,   1;
   5, 10,  11,   6,    1;
   6, 15,  24,  24,    8,    1;
   7, 21,  45,  70,   51,   14,    1;
   8, 28,  76, 165,  208,  130,   20,   1;
   9, 36, 119, 336,  629,  700,  315,  36,  1;
  10, 45, 176, 616, 1560, 2635, 2344, 834, 60, 1;
  ... (End)
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 86 (2.2.23).
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 496.
  • Louis Comtet, Analyse combinatoire, Tome 2, p. 104 #17, P.U.F., 1970.

Crossrefs

Main Diagonal: A056665. A054630 and A054631 are the upper and lower triangles.

Programs

  • Mathematica
    t[n_, k_] := (1/n)*Sum[EulerPhi[d]*k^(n/d), {d, Divisors[n]}]; Table[t[n-k+1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 20 2014, after Philippe Deléham *)
  • PARI
    T(n, k) = (1/n) * sumdiv(n, d, eulerphi(d)*k^(n/d));
    for(n=1, 15, for(k=1, n, print1(T(k, n - k + 1),", ");); print();) \\ Indranil Ghosh, Mar 25 2017
    
  • Python
    from sympy.ntheory import totient, divisors
    def T(n,k): return sum(totient(d)*k**(n//d) for d in divisors(n))//n
    for n in range(1, 16):
        print([T(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 25 2017

Formula

T(n,k) = (1/n)*Sum_{d | n} phi(d)*k^(n/d), where phi = Euler totient function A000010. - Philippe Deléham, Oct 08 2003
From Petros Hadjicostas, Feb 08 2021: (Start)
O.g.f. for column k >= 1: Sum_{n>=1} T(n,k)*x^n = -Sum_{j >= 1} (phi(j)/j) * log(1 - k*x^j).
Linear recurrence for row n >= 1: T(n,k) = Sum_{j=0..n} -binomial(j-n-1,j+1) * T(n,k-1-j) for k >= n + 2. (This recurrence is essentially due to Robert A. Russell, who contributed it in A321791.) (End)
From Richard L. Ollerton, May 07 2021: (Start)
T(n,k) = (1/n)*Sum_{i=1..n} k^gcd(n,i).
T(n,k) = (1/n)*Sum_{i=1..n} k^(n/gcd(n,i))*phi(gcd(n,i))/phi(n/gcd(n,i)).
T(n,k) = (1/n)*A185651(n,k) for n >= 1, k >= 1. (End)
Product_{n>=1} 1/(1 - x^n)^T(n,k) = Product_{n>=1} 1/(1 - k*x^n). - Seiichi Manyama, Apr 12 2025

Extensions

Additional references from Philippe Deléham, Oct 08 2003

A208535 Square array read by descending antidiagonals: T(n,k) is the number of n-bead necklaces of k colors not allowing reversal, with no adjacent beads having the same color (n, k >= 1).

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 3, 0, 0, 5, 6, 2, 1, 0, 6, 10, 8, 6, 0, 0, 7, 15, 20, 24, 6, 1, 0, 8, 21, 40, 70, 48, 14, 0, 0, 9, 28, 70, 165, 204, 130, 18, 1, 0, 10, 36, 112, 336, 624, 700, 312, 36, 0, 0, 11, 45, 168, 616, 1554, 2635, 2340, 834, 58, 1, 0, 12, 55, 240, 1044, 3360, 7826, 11160
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2012

Keywords

Comments

For prime rows, these appear to be evaluations of Moreau's necklace polynomials at the integers with several combinatorial interpretations (see Wikipedia link). - Tom Copeland, Oct 20 2014
From Petros Hadjicostas, Nov 05 2017: (Start)
The g.f. for column k follows easily from I. Gessel's formulas for this sequence. Since S(1,k) = k-1, we have T(1,k) = k + S(1,k) - (k - 1). Thus, Sum_{n >= 1} T(n,k)*x^n = k*x + Sum_{n >= 1} (1/n)*Sum_{d|n} (k - 1)^d*phi(n/d)*x^n - Sum_{s=0} (k-1)*x^{2*s+1}. Letting m = n/d, we get that (column k g.f.) = k*x - (k - 1)*x/(1 -x^2) + Sum_{m >= 1} (phi(m)/m)*Sum_{d >= 1}((k - 1)*x^m)^d/d. But Sum_{d>=1} z^d/d = -log(1 - z), and so (column k g.f.) = k*x - (k - 1)*x/(1 - x^2) - Sum_{m >= 1} (phi(m)/m)*log(1 - (k - 1)*x^m).
The other formula for the g.f. of column k of this sequence follows from the formula Sum_{n >= 1} (phi(n)/n)*log(1 + t^n) = t/(1 - t^2), which in turn follows from the well-known series Sum_{n >= 1} phi(n)*t^n/(1 + t^n) = t*(1 + t^2)/(1 - t^2)^2.
The extra term k*x in the g.f. for column k is due to the fact that we conventionally assume that a necklace with only one bead, colored with one of the k colors available, is such that there are "no adjacent beads having the same color" (even though, strictly speaking, a single bead is adjacent to itself when we go around the circle of the necklace).
One can use the g.f. for column k to derive the so-called "Empirical for row n" formulae that are denoted by a(k) and given in the formula section below (from n = 1 to n = 7). For example, for n = 3, a(k) = a(k, x=0), where a(k, x) = (1/3!)*d^3/dx^3 (column k g.f.). Here, d^3/dx^3 stands for "third derivative w.r.t. x". If we let f(x) = x/(1 - x^2) and g(x, m) = -log(1 - (k - 1)*x^m), then f^{(3)}(0) = 6, while g^{(3)}(0,m) = 2*(k - 1)^3 for m = 1, 0 for m=2, 6*(k - 1) for m = 3, and 0 for m >= 4. Then, a(k) = (1/6)*(-6*(k - 1) + 2*(k - 1)^3 + (2/3)*6*(k - 1)) = (1/3)*k^3 - k^2 + (2/3)*k. Using this method, one can derive an "Empirical for row n" formula for a(k) for any positive integer n. (End)

Examples

			Table T(n,k) (with rows n >= 1 and columns k >= 1) starts:
  1 2  3   4    5     6      7      8       9      10       11       12       13 ...
  0 1  3   6   10    15     21     28      36      45       55       66       78 ...
  0 0  2   8   20    40     70    112     168     240      330      440      572 ...
  0 1  6  24   70   165    336    616    1044    1665     2530     3696     5226 ...
  0 0  6  48  204   624   1554   3360    6552   11808    19998    32208    49764 ...
  0 1 14 130  700  2635   7826  19684   43800   88725   166870   295526   498004 ...
  0 0 18 312 2340 11160  39990 117648  299592  683280  1428570  2783880  5118828 ...
  0 1 36 834 8230 48915 210126 720916 2097684 5381685 12501280 26796726 53750346 ...
  ...
All solutions for n = 4 and k = 3:
  1    2    1    1    1    1
  3    3    2    2    3    2
  2    2    3    1    1    1
  3    3    2    2    3    3
		

Crossrefs

Columns 3..6: A106365, A106366, A106367, A106368.
Rows 2..7: A000217(n-1), A007290, A006528(n-1), A208536, A006565(n-1), A208537.

Programs

  • Mathematica
    T[n_, k_] := If[n == 1, k, Sum[ EulerPhi[n/d]*(k-1)^d, {d, Divisors[n]}]/n - If[OddQ[n], k-1, 0]]; Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 31 2017, after Andrew Howroyd *)
  • PARI
    T(n,k) = if(n==1, k, sumdiv(n,d,eulerphi(n/d)*(k-1)^d)/n - if(n%2, k-1));
    for(n=1, 10, for(k=1, 10, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 14 2017

Formula

Let S(n,k) = (1/n) Sum_{d|n} (k-1)^d phi(n/d), where phi is Euler's function.
Then for n even, T(n,k) = S(n,k) and for n > 1 and odd, T(n,k) = S(n,k) - (k-1), and T(1,k) = k. - Ira M. Gessel, Oct 21 2014, Sep 25 2017
Empirical for row n:
n=1: a(k) = k
n=2: a(k) = (1/2)*k^2 - (1/2)*k
n=3: a(k) = (1/3)*k^3 - k^2 + (2/3)*k
n=4: a(k) = (1/4)*k^4 - k^3 + (7/4)*k^2 - k
n=5: a(k) = (1/5)*k^5 - k^4 + 2*k^3 - 2*k^2 + (4/5)*k
n=6: a(k) = (1/6)*k^6 - k^5 + (5/2)*k^4 - (19/6)*k^3 + (7/3)*k^2 - (5/6)*k
n=7: a(k) = (1/7)*k^7 - k^6 + 3*k^5 - 5*k^4 + 5*k^3 - 3*k^2 + (6/7)*k
-----------
From Tom Copeland, Oct 20 2014: (Start)
The first three numbers in each row of the triangular array are given by T(n,k) = (1/k)*(n-k+1)! / (n-2*k+1)!.
For the table here, the first three rows, aside from initial zeros, are given by a(n,k) = (1/n)*(k + 1 - n)! / (k + 1 - 2*n)! or, with no leading zeros, by a(n,k) = (1/n)*(n+k-1)! / (k-1)!. The first three elements of each column correspond to the last three elements of a row in A238363 and the first three of A111492.
Prime rows (> 1) appear to be a(m,n) = (n^m - n)/m. See Wikipedia link. (End)
G.f. for column k: Sum_{n >= 1} T(n,k)*x^n = k*x - Sum_{n >= 1} (phi(n)/n)*((k - 1)*log(1 + x^n) + log(1 - (k - 1)*x^n)) = k*x - (k - 1)*x/(1 - x^2) - Sum_{n >= 1} (phi(n)/n)*log(1 - (k - 1)*x^n). - Petros Hadjicostas, Nov 05 2017

Extensions

Name edited by Petros Hadjicostas, Jun 24 2020

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

A027670 Number of different bracelets with 6 beads of at most n colors, allowing turning over.

Original entry on oeis.org

0, 1, 13, 92, 430, 1505, 4291, 10528, 23052, 46185, 86185, 151756, 254618, 410137, 638015, 963040, 1415896, 2034033, 2862597, 3955420, 5376070, 7198961, 9510523, 12410432, 16012900, 20448025, 25863201
Offset: 0

Views

Author

Keywords

Comments

Number of ways to color vertices of a hexagon using <= n colors, allowing rotations and reflections.
Equivalently, the number of distinct hexagons that can be tiled using equilateral triangles of n different colors. - Lekraj Beedassy, Dec 29 2007
Number of ways to color slots of a 2 X 3 matrix with the respective symmetric groups S_2 and S_3 acting on the rows / columns. - Marko Riedel, Jan 26 2017

References

  • J. L. Fisher, Application-Oriented Algebra (1977), ISBN 0-7002-2504-8, circa p. 215.
  • M. Gardner, New Mathematical Diversions from Scientific American, Simon and Schuster, New York, 1966, pages 245-246.
  • J.-P. Delahaye, Le miraculeux "lemme de Burnside"; Groupes et orbites, pp. 146-147, in 'Pour la Science' (French edition of 'Scientific American'), No. 350, December 2006, Paris.

Crossrefs

Cf. A006565.

Programs

  • Magma
    I:=[0, 1, 13, 92, 430, 1505, 4291]; [n le 7 select I[n] else 7*Self(n-1)-21*Self(n-2)+35*Self(n-3)-35*Self(n-4)+21*Self(n-5)-7*Self(n-6)+Self(n-7): n in [1..30]]; // Vincenzo Librandi, Apr 22 2012
  • Maple
    A027670 := n-> (n^6+3*n^4+4*n^3+2*n^2+2*n)/12;
  • Mathematica
    (* First do *) Needs["Combinatorica`"] (* then *) Table[ CycleIndex[ DihedralGroup[6], t] /. Table[ t[i] -> n, {i, 1, 6}], {n, 0, 26}]
    CoefficientList[Series[x*(1+x)*(1+5*x+17*x^2+7*x^3)/(1-x)^7,{x,0,30}],x] (* Vincenzo Librandi, Apr 22 2012 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,1,13,92,430,1505,4291},30] (* Harvey P. Dale, Mar 12 2018 *)
  • PARI
    a(n)=n*(n+1)*(n^4-n^3+4*n^2+2)/12 \\ Charles R Greathouse IV, Feb 24 2011
    

Formula

1/12*n*(n+1)*(n^4 - n^3 + 4*n^2 + 2).
G.f.: x*(1+x)*(1 + 5*x + 17*x^2 + 7*x^3)/(1-x)^7. - Colin Barker, Jan 29 2012
Cycle index: s1^6/12 + s2^3/3 + s3^2/6 + s1^2 * s2^2/4 + s6/6, -Marko Riedel, Jan 26 2017

Extensions

Name changed to reflect distinction between necklaces (cyclic) and bracelets (dihedral) by Marko Riedel, Jan 27 2017

A285522 Array read by antidiagonals: T(m,n) = number of circulant digraphs up to Cayley isomorphism on n vertices with edges colored according to step value using a maximum of m-1 colors.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 6, 6, 4, 1, 1, 6, 18, 10, 5, 1, 1, 20, 24, 40, 15, 6, 1, 1, 14, 135, 70, 75, 21, 7, 1, 1, 48, 130, 544, 165, 126, 28, 8, 1, 1, 52, 648, 700, 1625, 336, 196, 36, 9, 1, 1, 140, 1137, 4480, 2635, 3996, 616, 288, 45, 10, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 20 2017

Keywords

Comments

For the base case of m=2 the sequence counts circulant digraphs up to Cayley isomorphism. Two circulant graphs are Cayley isomorphic if there is a d, which is necessarily prime to n, that transforms through multiplication modulo n the step values of one graph into those of the other. For squarefree n this is the only way that two circulant graphs can be isomorphic. (See Liskovets reference for a proof.)
Alternatively, the number of mappings with domain {1..n-1} and codomain {1..m} up to equivalence. Mappings A and B are equivalent if there is a d, prime to n, such that A(i) = B(i*d mod n) for i in {1..n-1}. This sequence differs from A132191 only in that sequence also includes 0 in the domain which introduces an extra factor of m into the results since zero multiplied by anything is zero.
All column sequences are polynomials of order n-1 and these are the cycle index polynomials.
This sequence is also related to A075195(n, m) which counts necklaces and A285548(m, n) which is the sequence described in the Titsworth reference. In particular, A075195 is the analogous array with equivalence determined through the additive group instead of by multiplication whereas A285548 allows for both addition and multiplication.

Examples

			Table starts:
\n  1 2  3   4    5    6    7     8      9      10
m\ ---------------------------------------------------
1 | 1 1  1   1    1    1    1     1      1       1 ...
2 | 1 2  3   6    6   20   14    48     52     140 ...
3 | 1 3  6  18   24  135  130   648   1137    4995 ...
4 | 1 4 10  40   70  544  700  4480  11056   65824 ...
5 | 1 5 15  75  165 1625 2635 20625  65425  489125 ...
6 | 1 6 21 126  336 3996 7826 72576 280596 2521476 ...
...
Case n=10:
Only 1, 3, 7, 9 are prime to 10.
Multiplication modulo 10 is described by the following multiplication table.
  1, 2, 3, 4, 5, 6, 7, 8, 9  => (1)(2)(3)(4)(5)(6)(7)(8)(9) => m^9
  3, 6, 9, 2, 5, 8, 1, 4, 7  => (1397)(2684)(5)             => m^3
  7, 4, 1, 8, 5, 2, 9, 6, 3  => (1793)(2486)(5)             => m^3
  9, 8, 7, 6, 5, 4, 3, 2, 1  => (19)(28)(37)(46)(5)         => m^5
Each row of the multiplication table can be viewed as a permutation and together these form a commutative group on 4 elements. In this case the group is isomorphic to the cyclic group C_4. Each permutation can be represented in cycle notation. (shown above to the right of the corresponding multiplication table row). In order to count the equivalence classes using Polya's enumeration theorem only the number of cycles in each permutation is needed.
This gives the cycle index polynomial (1/4)*(m^9 + m^5 + 2*m^3). Putting m = 1..4 gives 1, 140, 4995, 65824.
		

Crossrefs

Programs

  • Mathematica
    A132191[m_, n_] := (1/EulerPhi[n])*Sum[If[GCD[k, n] == 1, m^DivisorSum[n, EulerPhi[#] / MultiplicativeOrder[k, #] &], 0], {k, 1, n}];
    T[m_, n_] := A132191[m, n]/m;
    Table[T[m - n + 1, n], {m, 1, 11}, {n, m, 1, -1}] // Flatten (* Jean-François Alcover, Jun 06 2017 *)
  • PARI
    a(n,x)=sum(k=1, n, if(gcd(k, n)==1, x^(sumdiv(n, d, eulerphi(d)/znorder(Mod(k, d)))-1), 0))/eulerphi(n);
    for(m=1, 6, for(n=1, 10, print1( a(n,m), ", ") ); print(); );

Formula

T(m, n) = A132191(m, n) / m.

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