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-10 of 12 results. Next

A208597 T(n,k) = number of n-bead necklaces labeled with numbers -k..k not allowing reversal, with sum zero.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 7, 6, 1, 5, 13, 23, 11, 1, 6, 21, 60, 77, 26, 1, 7, 31, 125, 291, 297, 57, 1, 8, 43, 226, 791, 1564, 1163, 142, 1, 9, 57, 371, 1761, 5457, 8671, 4783, 351, 1, 10, 73, 568, 3431, 14838, 39019, 49852, 20041, 902, 1, 11, 91, 825, 6077, 34153, 129823
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

			Table starts
...1....1.....1......1.......1.......1........1........1........1.........1
...2....3.....4......5.......6.......7........8........9.......10........11
...3....7....13.....21......31......43.......57.......73.......91.......111
...6...23....60....125.....226.....371......568......825.....1150......1551
..11...77...291....791....1761....3431.....6077....10021....15631.....23321
..26..297..1564...5457...14838...34153....69784...130401...227314....374825
..57.1163..8671..39019..129823..353333...833253..1764925..3438877...6267735
.142.4783.49852.288317.1172298.3770475.10259448.24627705.53630854.108036775
		

Crossrefs

Rows 3-7 are A002061(n+1), A208598, A208599, A208600, A208601.
Main diagonal is A208590.

Programs

  • Mathematica
    comps[r_, m_, k_] := Sum[(-1)^i*Binomial[r-1-i*m, k-1]*Binomial[k, i], {i, 0, Floor[(r-k)/m]}]; a[n_, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2k+1, #]&]/n; Table[a[n-k+1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 07 2017, after Andrew Howroyd's PARI code *)
  • PARI
    comps(r,m,k)=sum(i=0,floor((r-k)/m),(-1)^i*binomial(r-1-i*m, k-1)*binomial(k, i));
    a(n,k)=sumdiv(n,d,eulerphi(n/d)*comps(d*(k+1), 2*k+1, d))/n;
    for(n=1,8,for(k=1,10,print1(a(n,k),", ")); print()); \\ Andrew Howroyd, May 16 2017
    
  • Python
    from sympy import binomial, divisors, totient, floor
    def comps(r, m, k): return sum([(-1)**i*binomial(r - 1 - i*m, k - 1)*binomial(k, i) for i in range(floor((r - k)/m) + 1)])
    def a(n, k): return sum([totient(n//d)*comps(d*(k + 1), 2*k + 1, d) for d in divisors(n)])//n
    for n in range(1, 12): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Nov 07 2017, after PARI code
    
  • R
    require(numbers)
    comps <- function(r, m, k) {
      S <- numeric()
      for (i in 0:floor((r-k)/m)) S <- c(S, (-1)^i*choose(r-1-i*m, k-1)*choose(k, i))
      return(sum(S))
    }
    a <- function(n, k) {
      S <- numeric()
      for (d in divisors(n)) S <- c(S, eulersPhi(n/d)*comps(d*(k+1), 2*k+1, d))
      return(sum(S)/n)
    }
    for (n in 1:11) {
      for (k in 1:n) {
        print(a(k,n-k+1))
      }
    } # Indranil Ghosh, Nov 07 2017, after PARI code

Formula

T(n,k) = Sum_{d|n} phi(n/d) * A201552(d, k). - Andrew Howroyd, Oct 14 2017
Empirical for row n:
n=1: a(k) = 1.
n=2: a(k) = k + 1.
n=3: a(k) = k^2 + k + 1.
n=4: a(k) = (4/3)*k^3 + 2*k^2 + (5/3)*k + 1.
n=5: a(k) = (23/12)*k^4 + (23/6)*k^3 + (37/12)*k^2 + (7/6)*k + 1.
n=6: a(k) = (44/15)*k^5 + (22/3)*k^4 + (23/3)*k^3 + (14/3)*k^2 + (12/5)*k + 1.
n=7: a(k) = (841/180)*k^6 + (841/60)*k^5 + (325/18)*k^4 + (51/4)*k^3 + (949/180)*k^2 + (37/30)*k + 1.

A208826 Number of 5-bead necklaces labeled with numbers -n..n allowing reversal, with sum zero.

Original entry on oeis.org

7, 45, 155, 415, 905, 1755, 3085, 5077, 7891, 11761, 16887, 23555, 32005, 42575, 55545, 71305, 90175, 112597, 138931, 169671, 205217, 246115, 292805, 345885, 405835, 473305, 548815, 633067, 726621, 830231, 944497, 1070225, 1208055
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Row 5 of A208825.

Examples

			Some solutions for n=3:
  -2  -2  -2  -2  -3  -3  -2  -2  -2  -2  -1   0  -3  -1  -2  -1
  -2   0  -1  -1  -2  -2   1   0  -1   1  -1   0  -2   0   0   0
   1   1  -1  -2   2   0   0  -2   1  -1  -1   0   3   0   0   0
   0   1   3   2   2   3   0   1   1   1   1   0   1  -1  -1   1
   3   0   1   3   1   2   1   3   1   1   2   0   1   2   3   0
		

Crossrefs

Cf. A208825.

Formula

Empirical: a(n) = 3*a(n-1) - a(n-2) - 5*a(n-3) + 5*a(n-4) + a(n-5) - 3*a(n-6) + a(n-7).
Conjectures from Colin Barker, Jul 06 2018: (Start)
G.f.: x*(7 + 24*x + 27*x^2 + 30*x^3 + 5*x^4 - 2*x^5 + x^6) / ((1 - x)^5*(1 + x)^2).
a(n) = (23*n^4 + 46*n^3 + 58*n^2 + 44*n + 24) / 24 for n even.
a(n) = (23*n^4 + 46*n^3 + 58*n^2 + 26*n + 15) / 24 for n odd.
(End)

A208827 Number of 6-bead necklaces labeled with numbers -n..n allowing reversal, with sum zero.

Original entry on oeis.org

18, 167, 828, 2821, 7582, 17339, 35288, 65769, 114442, 188463, 296660, 449709, 660310, 943363, 1316144, 1798481, 2412930, 3184951, 4143084, 5319125, 6748302, 8469451, 10525192, 12962105, 15830906, 19186623, 23088772, 27601533, 32793926
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Row 6 of A208825.

Examples

			Some solutions for n=3:
  -3  -3  -3  -2  -2  -3  -3  -2  -3  -3  -3  -3  -2  -3  -3  -2
  -1   0  -2   0  -1  -2  -1  -1   0  -3  -1  -1  -1   2  -2   0
   3   1   0   0   3   2   0   1  -2   1   0   2  -2  -2   3   1
  -2  -1   3   0   0   3   2  -2  -1   3   0  -1   2  -2   2  -2
   3   0   3   0   0  -3  -1   2   3   0   3   3   0   2  -1   0
   0   3  -1   2   0   3   3   2   3   2   1   0   3   3   1   3
		

Crossrefs

Cf. A208825.

Formula

Empirical: a(n) = (22/15)*n^5 + (11/3)*n^4 + (14/3)*n^3 + (13/3)*n^2 + (43/15)*n + 1.
Conjectures from Colin Barker, Jul 07 2018: (Start)
G.f.: x*(18 + 59*x + 96*x^2 - 2*x^3 + 6*x^4 - x^5) / (1 - x)^6.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>6.
(End)

A208828 Number of 7-bead necklaces labeled with numbers -n..n allowing reversal, with sum zero.

Original entry on oeis.org

32, 609, 4390, 19657, 65134, 177097, 417204, 883409, 1720628, 3135633, 5410378, 8921049, 14153874, 21728505, 32416136, 47167393, 67132584, 93694273, 128489486, 173447145, 230812054, 303187369, 393560188, 505349233, 642431868, 809197169
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Row 7 of A208825.

Examples

			Some solutions for n=3:
  -3  -3  -2  -3  -3  -3  -3  -3  -3  -3  -3  -2  -3  -1  -3  -2
   1  -1  -2  -1   2  -2   1  -1  -2  -2   3  -2   2  -1  -1  -1
  -1   3   0  -2   0   2  -1   1   1  -1   0  -1  -2   0  -1   1
  -1   1   1  -1   1   1   2   1   3   2  -2  -1   0   0   1  -1
   1   0   2   2  -2   2  -3   1  -3   2  -2   3   1   1   1  -1
   2  -2  -1   3  -1  -2   1   2   3   3   1   0   0   1   2   3
   1   2   2   2   3   2   3  -1   1  -1   3   3   2   0   1   1
		

Crossrefs

Cf. A208825.

Formula

Empirical: a(n) = 4*a(n-1) - 3*a(n-2) - 8*a(n-3) + 14*a(n-4) - 14*a(n-6) + 8*a(n-7) + 3*a(n-8) - 4*a(n-9) + a(n-10).
Empirical g.f.: x*(32 + 481*x + 2050*x^2 + 4180*x^3 + 4100*x^4 + 2126*x^5 + 462*x^6 + 28*x^7 - 4*x^8 + x^9) / ((1 - x)^7*(1 + x)^3). - Colin Barker, Jul 07 2018

A208817 Number of n-bead necklaces labeled with numbers -n..n allowing reversal, with sum zero.

Original entry on oeis.org

1, 3, 8, 75, 905, 17339, 417204, 12322101, 427919519, 17112239947, 774546254686
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Diagonal of A208825.

Examples

			All solutions for n=3:
.-2....0...-3...-3...-2...-1...-2...-1
.-1....0....0....1....0...-1....1....0
..3....0....3....2....2....2....1....1
		

A208818 Number of n-bead necklaces labeled with numbers -1..1 allowing reversal, with sum zero.

Original entry on oeis.org

1, 2, 2, 5, 7, 18, 32, 84, 185, 486, 1192, 3179, 8261, 22290, 59788, 163181, 445699, 1228686, 3396224, 9440759, 26322371, 73680058, 206822134, 582308320, 1643573625, 4650401810, 13186590962, 37469003353
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Column 1 of A208825.

Examples

			All solutions for n=3:
..0...-1
..0....0
..0....1
		

A208819 Number of n-bead necklaces labeled with numbers -2..2 allowing reversal, with sum zero.

Original entry on oeis.org

1, 3, 5, 16, 45, 167, 609, 2471, 10143, 43223, 186533, 818836, 3629835, 16250859, 73300289, 332895316, 1520604469, 6981991345, 32205476541
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Column 2 of A208825.

Examples

			All solutions for n=3:
.-2...-1...-1...-2....0
..1....0...-1....0....0
..1....1....2....2....0
		

A208820 Number of n-bead necklaces labeled with numbers -3..3 allowing reversal, with sum zero.

Original entry on oeis.org

1, 4, 8, 38, 155, 828, 4390, 25202, 146803, 878708, 5330524, 32785934, 203687695, 1276913732, 8065359582, 51282069040
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Column 3 of A208825.

Examples

			All solutions for n=3:
.-2....0...-2...-3...-1...-3...-1...-2
.-1....0....1....1...-1....0....0....0
..3....0....1....2....2....3....1....2
		

A208821 Number of n-bead necklaces labeled with numbers -4..4 allowing reversal, with sum zero.

Original entry on oeis.org

1, 5, 13, 75, 415, 2821, 19657, 144871, 1090645, 8392423, 65527045, 518173267, 4139803293, 33366946637
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Column 4 of A208825.

Examples

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

A208822 Number of n-bead necklaces labeled with numbers -5..5 allowing reversal, with sum zero.

Original entry on oeis.org

1, 6, 18, 131, 905, 7582, 65134, 587682, 5416897, 50959134, 486441796, 4701644087, 45911470685
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Column 5 of A208825.

Examples

			Some solutions for n=3:
.-2...-2...-2...-3...-5...-3...-2...-5...-4...-4....0...-4...-3...-1...-4...-5
..0...-2...-1....0....2...-1....1....1...-1....0....0....2...-2...-1....1....0
..2....4....3....3....3....4....1....4....5....4....0....2....5....2....3....5
		

Crossrefs

Cf. A208825.
Showing 1-10 of 12 results. Next