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

A072605 Number of necklaces with n beads over an n-ary alphabet {a1,a2,...,an} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 0, where #(w,x) counts the letters x in word w.

Original entry on oeis.org

1, 1, 2, 4, 13, 50, 270, 1641, 11945, 96784, 887982, 8939051, 99298354, 1195617443, 15619182139, 219049941201, 3293800835940, 52746930894774, 897802366250126, 16167544246362567, 307372573011579188, 6148811682561390279, 129164845357784003661
Offset: 0

Views

Author

Wouter Meeussen, Aug 06 2002

Keywords

Crossrefs

Programs

  • Mathematica
    neck[li:{__Integer}] := Module[{n, d}, n=Plus@@li; d=n-First[li]; Fold[ #1+(EulerPhi[ #2]*(n/#2)!)/Times@@((li/#2)!)&, 0, Divisors[GCD@@li]]/n]; Table[ Plus@@(neck /@ IntegerPartitions[n]), {n, 24}]
  • PARI
    a(n)={if(n==0, 1, my(p=prod(k=1, n, 1/(1-x^k/k!) + O(x*x^n))); sumdiv(n, d, eulerphi(n/d)*d!*polcoeff(p,d))/n)} \\ Andrew Howroyd, Dec 20 2017

Formula

a(n) = (1/n) * Sum_{d|n} phi(n/d) * A005651(d) for n > 0. - Andrew Howroyd, Sep 25 2017
See Mathematica line.
a(n) ~ c * (n-1)!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264818011615... . - Vaclav Kotesovec, Aug 27 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Aug 23 2015
Name changed by Andrew Howroyd, Sep 25 2017

A261600 Number of primitive (aperiodic, or Lyndon) necklaces with n beads such that beads of a largest subset have label 0, beads of a largest remaining subset have label 1, and so on.

Original entry on oeis.org

1, 1, 1, 3, 11, 49, 265, 1640, 11932, 96780, 887931, 8939050, 99298073, 1195617442, 15619180497, 219049941148, 3293800823995, 52746930894773, 897802366153076, 16167544246362566, 307372573010691195, 6148811682561388635, 129164845357775064609
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2015

Keywords

Examples

			a(3) = 3: 001, 012, 021.
a(4) = 11: 0001, 0011, 0012, 0021, 0102, 0123, 0132, 0213, 0231, 0312, 0321.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, g, d, j) option remember; `if`(g>0 and gn, 0, binomial(n/j, i/j)*b(n-i, i, igcd(i, g), d, j)))))
        end:
    a:= n-> `if`(n=0, 1, add(add((f-> `if`(f=0, 0, f*b(n$2, 0, d, j)))(
                         mobius(j)), j=divisors(d)), d=divisors(n))/n):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, i_, g_, d_, j_] := b[n, i, g, d, j] = If[g>0 && gn, 0, Binomial[n/j, i/j]*b[n-i, i, GCD[i, g], d, j]]]]]; a[n_] := If[n==0, 1, Sum[Sum[ Function[f, If[f==0, 0, f*b[n, n, 0, d, j]]][MoebiusMu[j]], {j, Divisors[ d]}], {d, Divisors[n]}]/n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 22 2017, translated from Maple *)

Formula

a(n) ~ c * (n-1)!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264818011615... . - Vaclav Kotesovec, Aug 27 2015

A261599 Number of primitive (aperiodic, or Lyndon) necklaces with n beads of unlabeled colors such that the numbers of beads per color are distinct.

Original entry on oeis.org

1, 1, 0, 1, 1, 3, 13, 24, 67, 252, 1795, 4038, 16812, 61750, 349806, 3485026, 10391070, 49433135, 240064988, 1282012986, 9167581934, 131550811985, 459677212302, 2707382738558, 14318807586215, 94084166753923, 601900541189696, 5894253303715121
Offset: 0

Views

Author

Alois P. Heinz, Aug 25 2015

Keywords

Examples

			a(4) = 1: 0001.
a(5) = 3: 00001, 00011, 00101.
a(6) = 13: 000001, 000011, 000101, 000112, 000121, 000122, 001012, 001021, 001022, 001102, 001201, 001202, 010102.
a(7) = 24: 0000001, 0000011, 0000101, 0000111, 0000112, 0000121, 0000122, 0001001, 0001011, 0001012, 0001021, 0001022, 0001101, 0001102, 0001201, 0001202, 0010011, 0010012, 0010021, 0010022, 0010101, 0010102, 0010201, 0010202.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, g, d, j) option remember; `if`(i*(i+1)/20
           and gn, 0, binomial(n/j, i/j)*b(n-i, i-1, igcd(i, g), d, j))))
        end:
    a:= n-> `if`(n=0, 1, add(add((f-> `if`(f=0, 0, f*b(n$2, 0, d, j)))(
                         mobius(j)), j=divisors(d)), d=divisors(n))/n):
    seq(a(n), n=0..30);
  • Mathematica
    a[0] = 1; a[n_] := With[{P = Product[1 + x^k/k!, {k, 1, n}] + O[x]^(n+1) // Normal}, DivisorSum[n, MoebiusMu[n/#]*#!*Coefficient[P, x, #]&]/n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, after Andrew Howroyd *)
  • PARI
    a(n)={if(n==0, 1, my(p=prod(k=1, n, (1+x^k/k!) + O(x*x^n))); sumdiv(n, d, moebius(n/d)*d!*polcoeff(p, d))/n)} \\ Andrew Howroyd, Dec 21 2017

Formula

a(n) = (1/n) * Sum_{d | n} moebius(n/d) * A007837(d) for n>0. - Andrew Howroyd, Dec 21 2017
Showing 1-3 of 3 results.