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

A106367 Number of necklaces with n beads of 5 colors, no 2 adjacent beads the same color.

Original entry on oeis.org

5, 10, 20, 70, 204, 700, 2340, 8230, 29140, 104968, 381300, 1398500, 5162220, 19175140, 71582940, 268439590, 1010580540, 3817763740, 14467258260, 54975633976, 209430787820, 799645010860, 3059510616420, 11728124734500
Offset: 1

Views

Author

Christian G. Bower, Apr 29 2005

Keywords

Crossrefs

Column 5 of A208535.

Programs

  • Mathematica
    a[n_] := If[n==1, 5, Sum[EulerPhi[n/d]*(4*(-1)^d+4^d), {d, Divisors[n]}]/n ];
    Array[a, 35] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
  • PARI
    a(n) = if(n==1, 5, sumdiv(n, d, eulerphi(n/d)*(4*(-1)^d + 4^d))/n); \\ Andrew Howroyd, Oct 14 2017

Formula

CycleBG transform of (5, 0, 0, 0, ...)
CycleBG transform T(A) = invMOEBIUS(invEULER(Carlitz(A)) + A(x^2) - A) + A.
Carlitz transform T(A(x)) has g.f. 1/(1-Sum_{k>0}(-1)^(k+1)*A(x^k)).
a(n) = (1/n) * Sum_{d | n} totient(n/d) * (4*(-1)^d + 4^d) for n > 1. - Andrew Howroyd, Mar 12 2017

A208533 Number of n-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.

Original entry on oeis.org

1, 1, 2, 24, 204, 2635, 39990, 720916, 14913192, 348684381, 9090909090, 261535848376, 8230246567620, 281241174889207, 10371206370593250, 410525522392242720, 17361641481138401520, 781282469565908953017, 37275544492386193492506, 1879498672877604463254424
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2012

Keywords

Examples

			All solutions for n=4:
..2....1....1....1....1....1....2....1....1....3....1....1....1....2....1....1
..3....2....4....4....4....3....4....4....3....4....3....4....2....3....2....2
..2....4....2....3....2....2....3....1....1....3....4....3....1....4....3....1
..4....2....4....2....3....3....4....4....3....4....2....4....4....3....2....2
..
..1....1....2....1....2....1....1....1
..2....3....3....3....4....2....2....3
..1....4....2....1....2....4....3....2
..3....3....3....4....4....3....4....4
		

Crossrefs

Diagonal of A208535.

Programs

  • Mathematica
    a[1] = 1; a[n_] = (1/n)*DivisorSum[n, EulerPhi[n/#]*((n-1)*(-1)^# + (n-1)^#)& ]; Array[a, 20] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)
  • PARI
    a(n) = if (n==1, 1, (1/n) * sumdiv(n, d, eulerphi(n/d) * ((n-1)*(-1)^d + (n-1)^d))); \\ Michel Marcus, Nov 01 2017

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * ((n-1)*(-1)^d + (n-1)^d) for n > 1. - Andrew Howroyd, Mar 12 2017

Extensions

a(14)-a(20) from Andrew Howroyd, Mar 12 2017

A330620 Number of length n necklaces with entries covering an initial interval of positive integers and no adjacent entries equal.

Original entry on oeis.org

0, 1, 2, 10, 54, 392, 3378, 34120, 393738, 5112406, 73756026, 1170482186, 20263782630, 380047964920, 7676106365966, 166114208828980, 3834434324386350, 94042629535109500, 2442147034719168714, 66942194906112161302, 1931543452345335094678, 58519191359163454708564
Offset: 1

Views

Author

Andrew Howroyd, Dec 20 2019

Keywords

Examples

			Case n=4: there are the following 10 necklaces:
  1212,
  1213, 1232, 1323,
  1234, 1243, 1324, 1342, 1423, 1432.
		

Crossrefs

Row sums of A330618.

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)}
    a(n)={if(n<1, n==0, sum(j=1, n, U(n,j)*sum(k=j, n, (-1)^(k-j)*binomial(k, j))))}

A208534 Number of n-bead necklaces of 7 colors not allowing reversal, with no adjacent beads having the same color.

Original entry on oeis.org

7, 21, 70, 336, 1554, 7826, 39990, 210126, 1119790, 6047412, 32981550, 181402676, 1004668770, 5597460306, 31345666730, 176319474366, 995685849690, 5642220380006, 32071565263710, 182807925027504
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2012

Keywords

Examples

			Some solutions for n=4
..1....1....2....3....3....1....1....2....1....3....1....3....4....1....1....1
..3....5....3....5....5....6....3....7....5....7....4....7....7....2....3....5
..1....7....4....6....3....1....4....4....7....6....3....5....5....4....6....4
..5....2....3....7....7....6....5....3....6....4....2....4....6....7....2....2
		

Crossrefs

Column 7 of A208535.
Previous Showing 11-14 of 14 results.