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 13 results. Next

A286928 Number of solutions to the equation x_1 + ... + x_n =0 satisfying -n<=x_i<=n (1<=i<=n).

Original entry on oeis.org

1, 1, 5, 37, 489, 8801, 204763, 5832765, 197018321, 7702189345, 342237634221, 17039997700639, 939906923598525, 56899727331724863, 3751071253402671045, 267515957818316650221, 20522595752454270972321, 1685273102403664075044305, 147501996974331775160471677
Offset: 0

Views

Author

Andrew Howroyd, May 16 2017

Keywords

Comments

The number of variables in the equation is exactly n and each variable can have a value of -n to n.
Also the number of compositions of n^2 into a maximum of n parts and each part having a maximum value of 2n. Equivalently, the number of compositions of n(n+1) into exactly n parts and each part having a maximum value of 2n+1.

Examples

			Case n=3:
Solutions are: {-3 0 3}x6, {-3 1 2}x6, {-2 -1 3}x6, {-2 0 2}x6,
               {-2 1 1}x3, {-1 -1 2}x3, {-1 0 1}x6, {0 0 0}x1
In the above, {-3 0 3}x6 means that the values can be expanded to 6 solutions by considering different orderings.
In total there are 6+6+6+6+3+3+6+1 = 37 solutions so a(3)=37.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^i*Binomial[n, i]*Binomial[n*(n+1) - i*(2n+1) - 1, n-1], {i, 0, n/2}]; Array[a, 18] (* Jean-François Alcover, Oct 01 2017 *)
  • PARI
    \\ nr compositions of r with max value m into exactly k parts
    compositions(r,m,k)=sum(i=0,floor((r-k)/m),(-1)^i*binomial(r-1-i*m, k-1)*binomial(k, i));
    a(n)=compositions(n*(n+1),2*n+1,n);
    
  • PARI
    {a(n) = polcoeff((sum(k=0, 2*n, x^k))^n, n^2, x)} \\ Seiichi Manyama, Dec 13 2018

Formula

a(n) = Sum_{i=0..floor(n/2)} (-1)^i*binomial(n*(n+1)-i*(2*n+1)-1, n-1)*binomial(n, i).
a(n) = [x^(n^2)] (Sum_{k=0..2*n} x^k)^n. - Seiichi Manyama, Dec 13 2018
a(n) ~ sqrt(3) * exp(1/2) * 2^(n - 1/2) * n^(n - 3/2) / sqrt(Pi). - Vaclav Kotesovec, Dec 15 2018

Extensions

a(0)=1 prepended by Seiichi Manyama, Dec 13 2018

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

Original entry on oeis.org

1, 3, 13, 125, 1761, 34153, 833253, 24627705, 855798877, 34223775091, 1549090700059, 78325577416281, 4376902102440375, 267933660979057571, 17834397187887850661, 1282662234529669344753, 99133711906097886767313, 8194555387462964814207631
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Diagonal of A208597.

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), 2 k + 1, #] &]/n; a[n_] := a[n, n]; Array[a, 18] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Extensions

a(12)-a(18) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 3, 7, 23, 77, 297, 1163, 4783, 20041, 85735, 371955, 1634429, 7254547, 32486709, 146576693, 665720447, 3041096613, 13963651875, 64410421307, 298331882891, 1386933722321, 6469566027565, 30271114380919, 142037330038069, 668187211909327
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 2 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 2]; Array[a, 25] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A005191(d). - Andrew Howroyd, Mar 02 2017

Extensions

a(22)-a(25) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 4, 13, 60, 291, 1564, 8671, 49852, 292927, 1753964, 10656757, 65549844, 407347747, 2553684852, 16130539053, 102563204892, 655918173287, 4216358457772, 27227967629683, 176554882805940, 1149099219084877, 7504110622072860, 49155856119036993, 322903351882566436
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 3 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 3]; Array[a, 24] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A025012(d). - Andrew Howroyd, Mar 02 2017

Extensions

a(20)-a(24) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 5, 21, 125, 791, 5457, 39019, 288317, 2178929, 16773395, 131034839, 1036252649, 8279446917, 66733111919, 541954722471, 4430427981533, 36428763143945, 301074015186469, 2499725665085301, 20840038803521835, 174388665638906551, 1464205768804076875
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 4 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 4]; Array[a, 22] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A025014(d). - Andrew Howroyd, Mar 02 2017

Extensions

a(16)-a(22) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 6, 31, 226, 1761, 14838, 129823, 1172298, 10829443, 101888166, 972840341, 9402986626, 91822503449, 904557886854, 8978540544171, 89709076112442, 901536608361003, 9106692124614666, 92411996211470633, 941636535001651066, 9630568821834643189, 98829095219423607906
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 5 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 5]; Array[a, 22] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A201549(d).

Extensions

a(15)-a(22) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 7, 43, 371, 3431, 34153, 353333, 3770475, 41165305, 457714497, 5164908167, 58997692301, 680874861687, 7926902673655, 92986983743513, 1097999648804923, 13040634990748733, 155677447454317639, 1866995100779692627, 22482675584863229261
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 6 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 6]; Array[a, 20] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A201550(d). - Andrew Howroyd, Mar 02 2017

Extensions

a(15)-a(20) from Andrew Howroyd, Mar 02 2017

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

Original entry on oeis.org

1, 8, 57, 568, 6077, 69784, 833253, 10259448, 129245091, 1658145128, 21589248803, 284548542120, 3789094334455, 50900085245304, 688944374917247, 9386664978851448, 128633790260673263, 1771859642698543096, 24518513933529549357, 340679786167936420216
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Examples

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

Crossrefs

Column 7 of A208597.

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_Integer, k_] := DivisorSum[n, EulerPhi[n/#] comps[#*(k + 1), 2 k + 1, #] &]/n; a[n_] = a[n, 7]; Array[a, 20] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A201551(d). - Andrew Howroyd, Mar 02 2017

Extensions

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

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

Original entry on oeis.org

6, 23, 60, 125, 226, 371, 568, 825, 1150, 1551, 2036, 2613, 3290, 4075, 4976, 6001, 7158, 8455, 9900, 11501, 13266, 15203, 17320, 19625, 22126, 24831, 27748, 30885, 34250, 37851, 41696, 45793, 50150, 54775, 59676, 64861, 70338, 76115, 82200, 88601
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Comments

Row 4 of A208597.

Examples

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

Crossrefs

Cf. A208597.

Formula

Empirical: a(n) = (4/3)*n^3 + 2*n^2 + (5/3)*n + 1.
Conjectures from Colin Barker, Mar 07 2018: (Start)
G.f.: x*(6 - x + 4*x^2 - x^3) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4.
(End)

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

Original entry on oeis.org

11, 77, 291, 791, 1761, 3431, 6077, 10021, 15631, 23321, 33551, 46827, 63701, 84771, 110681, 142121, 179827, 224581, 277211, 338591, 409641, 491327, 584661, 690701, 810551, 945361, 1096327, 1264691, 1451741, 1658811, 1887281, 2138577, 2414171
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Comments

Row 5 of A208597.

Examples

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

Crossrefs

Cf. A208597.

Formula

Empirical: a(n) = (23/12)*n^4 + (23/6)*n^3 + (37/12)*n^2 + (7/6)*n + 1.
Conjectures from Colin Barker, Mar 07 2018: (Start)
G.f.: x*(11 + 22*x + 16*x^2 - 4*x^3 + x^4) / (1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>5.
(End)
Showing 1-10 of 13 results. Next