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.

A191484 Number of compositions of even natural numbers into 5 parts <= n.

Original entry on oeis.org

1, 16, 122, 512, 1563, 3888, 8404, 16384, 29525, 50000, 80526, 124416, 185647, 268912, 379688, 524288, 709929, 944784, 1238050, 1600000, 2042051, 2576816, 3218172, 3981312, 4882813, 5940688
Offset: 0

Views

Author

Adi Dani, Jun 03 2011

Keywords

Comments

Number of ways of placing an even number of indistinguishable objects in 5 distinguishable boxes with the condition that in each box can be at most n objects.

Examples

			a(1)=16 as there are 16 compositions of even natural numbers into 5 parts <= 1:
(0,0,0,0,0);
(0,0,0,1,1), (0,0,1,0,1), (0,0,1,1,0), (0,1,1,0,0), (0,1,0,1,0), (0,1,0,0,1), (1,1,0,0,0), (1,0,1,0,0), (1,0,0,1,0), (1,0,0,0,1);
(0,1,1,1,1), (1,0,1,1,1), (1,1,0,1,1), (1,1,1,0,1), (1,1,1,1,0).
		

Crossrefs

Cf. A036486 (3 parts), A171714 (4 parts), A191489 (6 parts), A191494 (7 parts), A191495 (8 parts).

Programs

  • Magma
    [((n + 1)^5 + (1 + (-1)^n)/2 )/2: n in [0..40]]; // Vincenzo Librandi, Jun 16 2011
  • Mathematica
    Table[1/2*((n + 1)^5 + (1 + (-1)^n)*1/2), {n, 0, 25}]
    LinearRecurrence[{5,-9,5,5,-9,5,-1},{1,16,122,512,1563,3888,8404},50] (* Harvey P. Dale, Nov 09 2011 *)

Formula

a(n) = ((n + 1)^5 + (1 + (-1)^n)/2 )/2.
a(n) = 5*a(n-1) - 9*a(n-2) + 5*a(n-3) + 5*a(n-4) - 9*a(n-5) + 5*a(n-6) - a(n-7).
G.f.: (16*x^4 + 41*x^3 + 51*x^2 + 11*x + 1)/((1-x)^6*(1+x)).

A191494 Number of compositions of even natural numbers in 7 parts <= n.

Original entry on oeis.org

1, 64, 1094, 8192, 39063, 139968, 411772, 1048576, 2391485, 5000000, 9743586, 17915904, 31374259, 52706752, 85429688, 134217728, 205169337, 306110016, 446935870, 640000000, 900544271, 1247178944, 1702412724, 2293235712, 3051757813, 4015905088
Offset: 0

Views

Author

Adi Dani, Jun 03 2011

Keywords

Comments

Number of ways of placing an even number of indistinguishable objects in 7 distinguishable boxes with the condition that in each box can be at most n objects.

Examples

			a(1)=64 and compositions of even natural numbers into 7 parts no greater than 1 are
:(0,0,0,0,0,0,0) --> 7!/7!0! =  1
:(0,0,0,0,0,1,1) --> 7!/5!2! = 21
:(0,0,0,1,1,1,1) --> 7!/3!4! = 35
:(0,1,1,1,1,1,1) --> 7!/1!6! =  7
		

Crossrefs

Cf. A036486 (3 parts), A171714 (4 parts), A191484 (5 parts), A191489 (6 parts), A191495 (8 parts).

Programs

  • Magma
    [((n + 1)^7 + (1+(-1)^n)/2 )/2: n in [0..40]]; // Vincenzo Librandi, Jun 16 2011
  • Mathematica
    Table[1/2*((n + 1)^7 + (1 + (-1)^n)*1/2), {n, 0, 25}]

Formula

a(n) = ((n + 1)^7 + (1 + (-1)^n)/2 )/2.
G.f.: ( 1 + 57*x + 666*x^2 + 1786*x^3 + 1821*x^4 + 645*x^5 + 64*x^6 ) / ( (1+x)*(x-1)^8 ). - R. J. Mathar, Jun 08 2011

A191489 Number of compositions of even natural numbers into 6 parts <= n.

Original entry on oeis.org

1, 32, 365, 2048, 7813, 23328, 58825, 131072, 265721, 500000, 885781, 1492992, 2413405, 3764768, 5695313, 8388608, 12068785, 17006112, 23522941, 32000000, 42883061, 56689952, 74017945, 95551488, 122070313, 154457888
Offset: 0

Views

Author

Adi Dani, Jun 03 2011

Keywords

Comments

Number of ways of placing of an even number of indistinguishable objects in 6 distinguishable boxes with condition that in each box can be at most n objects.

Examples

			a(1)=32 compositions of even natural numbers in 6 parts <= 1 are
:(0,0,0,0,0,0)--> 6!/(6!0!) =  1
:(0,0,0,0,1,1)--> 6!/(4!2!) = 15
:(0,0,1,1,1,1)--> 6!/(2!4!) = 15
:(1,1,1,1,1,1)--> 6!/(0!6!) =  1
a(2)=365 compositions of even natural numbers in 6 parts <= 2 are
:(0,0,0,0,0,0)--> 6!/(6!0!0!) =  1
:(0,0,0,0,1,1)--> 6!/(4!2!0!) = 15
:(0,0,0,0,0,2)--> 6!/(5!0!1!) =  6
:(0,0,1,1,1,1)--> 6!/(2!4!0!) = 15
:(0,0,0,1,1,2)--> 6!/(3!2!1!) = 60
:(0,0,0,0,2,2)--> 6!/(4!0!2!) = 15
:(0,1,1,1,1,2)--> 6!/(1!4!1!) = 30
:(0,0,0,2,2,2)--> 6!/(3!0!3!) = 20
:(0,0,1,1,2,2)--> 6!/(2!2!2!) = 90
:(1,1,1,1,1,1)--> 6!/(0!6!0!) =  1
:(0,1,1,2,2,2)--> 6!/(1!2!3!) = 60
:(0,0,2,2,2,2)--> 6!/(2!0!4!) = 15
:(1,1,1,1,2,2)--> 6!/(0!4!2!) = 15
:(0,2,2,2,2,2)--> 6!/(1!0!5!) =  6
:(1,1,2,2,2,2)--> 6!/(0!2!4!) = 15
:(2,2,2,2,2,2)--> 6!/(0!0!6!) =  1
		

Crossrefs

Cf. A036486 (3 parts), A171714 (4 parts), A191484 (5 parts), A191494 (7 parts), A191495 (8 parts).

Programs

  • Magma
    [((n + 1)^6 + (1+(-1)^n)/2 )/2: n in [0..40]]; // Vincenzo Librandi, Jun 16 2011
  • Mathematica
    Table[1/2*((n + 1)^6 + (1 + (-1)^n)*1/2), {n, 0, 25}]

Formula

a(n) = ((n + 1)^6 + (1+(-1)^n)/2 )/2.
G.f.: (x^2 + 10*x + 1)*(x^4 + 16*x^3 + 26*x^2 + 16*x + 1) / ( (1+x)*(1-x)^7 ). - R. J. Mathar, Jun 06 2011
a(2n) = A175113(n). - R. J. Mathar, Jun 07 2011

A191495 Number of compositions of even natural numbers into 8 parts <= n.

Original entry on oeis.org

1, 128, 3281, 32768, 195313, 839808, 2882401, 8388608, 21523361, 50000000, 107179441, 214990848, 407865361, 737894528, 1281445313, 2147483648, 3487878721, 5509980288, 8491781521, 12800000000, 18911429681, 27437936768, 39155492641, 55037657088, 76293945313, 104413532288
Offset: 0

Views

Author

Adi Dani, Jun 03 2011

Keywords

Comments

Number of ways of placing an even number of indistinguishable objects in 8 distinguishable boxes with the condition that in each box can be at most n objects.

Examples

			a(1)=128 compositions of even natural numbers into 8 parts no greater than 1 are
  (0,0,0,0,0,0,0,0) --> 8!/(8!0!) =  1
  (0,0,0,0,0,0,1,1) --> 8!/(6!2!) = 28
  (0,0,0,0,1,1,1,1) --> 8!/(4!4!) = 70
  (0,0,1,1,1,1,1,1) --> 8!/(2!6!) = 28
  (1,1,1,1,1,1,1,1) --> 8!/(0!8!) =  1
		

Crossrefs

Cf. A036486 (3 parts), A171714 (4 parts), A191484 (5 parts), A191489 (6 parts), A191494 (7 parts).

Programs

  • Magma
    [ 1/2*((n + 1)^8 + (1 + (-1)^n)*1/2): n in [0..35]]; // Vincenzo Librandi, Jun 06 2011
    
  • Mathematica
    Table[1/2*((n + 1)^8 + (1 + (-1)^n)*1/2), {n, 0, 25}]
    LinearRecurrence[{8,-27,48,-42,0,42,-48,27,-8,1},{1,128,3281,32768,195313,839808,2882401,8388608,21523361,50000000},30] (* Harvey P. Dale, Mar 13 2013 *)
  • PARI
    a(n)=((n+1)^8+1)>>1 \\ Charles R Greathouse IV, Jun 06 2011

Formula

a(n) = ( (n+1)^8 + (1 + (-1)^n)/2 )/2.
G.f.: ( -1 - 120*x - 2284*x^2 - 9928*x^3 - 15654*x^4 - 9928*x^5 - 2284*x^6 - 120*x^7 - x^8 ) / ( (1+x)*(x-1)^9 ). - R. J. Mathar, Jun 06 2011
a(n) = 8*a(n-1) - 27*a(n-2) + 48*a(n-3) - 42*a(n-4) + 42*a(n-6) - 48*a(n-7) + 27*a(n-8) - 8*a(n-9) + a(n-10); a(0)=1, a(1)=128, a(2)=3281, a(3)=32768, a(4)=195313, a(5)=839808, a(6)=2882401, a(7)=8388608, a(8)=21523361, a(9)=50000000. - Harvey P. Dale, Mar 13 2013

A245996 Number of length 1+2 0..n arrays with no pair in any consecutive three terms totaling exactly n.

Original entry on oeis.org

2, 8, 28, 64, 126, 216, 344, 512, 730, 1000, 1332, 1728, 2198, 2744, 3376, 4096, 4914, 5832, 6860, 8000, 9262, 10648, 12168, 13824, 15626, 17576, 19684, 21952, 24390, 27000, 29792, 32768, 35938, 39304, 42876, 46656, 50654, 54872, 59320, 64000, 68922
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

From Pontus von Brömssen, Jan 10 2022: (Start)
Proof of the empirical observations in the Formula section:
For k = 1, 2, 3, let N_k be the number of triples (x, y, z) with x, y, and z in 0..n, that satisfy x+y = n (if k=1), x+y = y+z = n (if k=2), or x+y = y+z = z+x = n (if k=3).
By inclusion-exclusion (and symmetry between x, y, and z), a(n) = (n+1)^3 - 3*N_1 + 3*N_2 - N_3. The unique solution to x+y = y+z = z+x = n is x = y = z = n/2, so N_3 = 1 if n is even, otherwise N_3 = 0. We write this as N_3 = [n even]. It is easily seen that N_1 = (n+1)^2 (x and z can be chosen freely and y = n-x) and that N_2 = n+1 (y can be chosen freely and x = z = n-y), so a(n) = (n+1)^3 - 3*(n+1)^2 + 3*(n+1) - [n even] = n^3 + [n odd] = 2*ceiling(n^3/2) = 2*A036486(n).
The recurrence and the generating function follow from this. (End)

Examples

			Some solutions for n=10:
  6   9   5   8   0   5   8   6   9   8   5   0   4   8   5   2
  3   8   3   0   0   7   9   5   0   4   7   5   2   4   7   6
  6   9   6   9   5   9   7   3   7   4   1   7  10   0   2   6
		

Crossrefs

Row 1 of A245995.
Cf. A036486.

Formula

Empirical: a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
From R. J. Mathar, Aug 10 2014: (Start)
Empirical: a(n) = 2*A036486(n).
G.f.: 2*x*(1+x+4*x^2) / ( (1+x)*(x-1)^4 ). (End)

A191687 Table T(n,k) = ceiling((1/2)*((k+1)^n+(1+(-1)^k)/2)) read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 4, 5, 2, 1, 1, 8, 14, 8, 3, 1, 1, 16, 41, 32, 13, 3, 1, 1, 32, 122, 128, 63, 18, 4, 1, 1, 64, 365, 512, 313, 108, 25, 4, 1, 1, 128, 1094, 2048, 1563, 648, 172, 32, 5, 1
Offset: 1

Views

Author

Adi Dani, Jun 11 2011

Keywords

Comments

T(n,k) is the number of compositions of even natural numbers into n parts <= k.

Examples

			Top left corner:
  1, 1, 1,  1,  1,...
  1, 1, 2,  2,  3,...
  1, 2, 5,  8, 13,...
  1, 4,14, 32, 63,...
  1, 8,41,128,313,...
T(2,4)=13: there are 13 compositions of even natural numbers into 2 parts <=4
0: (0,0);
2: (0,2), (2,0), (1,1);
4: (0,4), (4,0), (1,3), (3,1), (2,2);
6: (2,4), (4,2), (3,3);
8: (4,4).
		

Crossrefs

Programs

  • Mathematica
    Table[Table[Ceiling[1/2*((k+1)^n+(1+(-1)^k)/2)],{n,0,9},{k,0,9}]]
Showing 1-6 of 6 results.