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

A171714 a(n) = ceiling((n+1)^4/2).

Original entry on oeis.org

1, 8, 41, 128, 313, 648, 1201, 2048, 3281, 5000, 7321, 10368, 14281, 19208, 25313, 32768, 41761, 52488, 65161, 80000, 97241, 117128, 139921, 165888, 195313, 228488, 265721, 307328, 353641, 405000, 461761, 524288, 592961, 668168, 750313, 839808
Offset: 0

Views

Author

Adi Dani, May 29 2011

Keywords

Comments

Number of compositions of even natural numbers into 4 parts <=n.
Number of ways of placings of an even number of indistinguishable objects into 4 distinguishable boxes with the condition that in each box there can be at most n objects.

Examples

			a(1)=8: there are 8 compositions of even natural numbers into 4 parts <=1
(0,0,0,0);
(0,0,1,1), (0,1,0,1), (0,1,1,0), (1,0,0,1), (1,0,1,0), (1,1,0,0);
(1,1,1,1).
a(2)=41: there are 41 compositions of even natural numbers into 4 parts <=2
for 0: (0,0,0,0);
for 2: (0,0,0,2), (0,0,2,0), (0,2,0,0), (2,0,0,0), (0,0,1,1), (0,1,0,1), (0,1,1,0), (1,0,0,1), (1,0,1,0), (1,1,0,0);
for 4: (0,0,2,2), (0,2,0,2), (0,2,2,0), (2,0,0,2), (2,0,2,0), (2,2,0,0), (0,1,1,2), (0,1,2,1), (0,2,1,1), (1,0,1,2), (1,0,2,1), (1,1,0,2), (1,1,2,0), (1,2,0,1), (1,2,1,0), (2,0,1,1), (2,1,0,1), (2,1,1,0), (1,1,1,1);
for 6: (0,2,2,2), (2,0,2,2), (2,2,0,2), (2,2,2,0), (1,1,2,2), (1,2,1,2), (1,2,2,1), (2,1,1,2), (2,1,2,1), (2,2,1,1);
for 8: (2,2,2,2).
		

Crossrefs

Programs

  • Magma
    [1/2*((n+1)^4+((1+(-1)^n)*1/2)^4): n in [0..40]]; // Vincenzo Librandi, Jun 16 2011
    
  • Mathematica
    Table[1/2((n + 1)^4 + ((1 + (-1)^n)*1/2)^4), {n, 0, 25}]
    Ceiling[Range[40]^4/2] (* Bruno Berselli, Jan 18 2017 *)
  • PARI
    a(n) = ceil(n^4/2); \\ Michel Marcus, Dec 14 2013

Formula

a(n) = 1/2*((n + 1)^4 + ((1 + (-1)^n)*1/2)^4).
a(n) = +4*a(n-1) -5*a(n-2) +5*a(n-4) -4*a(n-5) +1*a(n-6).
G.f.: (1 + 4*x + 14*x^2 + 4*x^3 + x^4)/((1 + x)*(1 - x)^5).
a(n) = (n+1)^4 - floor((n+1)^4/2). - Bruno Berselli, Jan 18 2017

Extensions

Better name from Enrique Pérez Herrero, Dec 14 2013

A192396 Square array T(n, k) = floor(((k+1)^n - (1+(-1)^k)/2)/2) read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 4, 4, 2, 0, 0, 8, 13, 8, 2, 0, 0, 16, 40, 32, 12, 3, 0, 0, 32, 121, 128, 62, 18, 3, 0, 0, 64, 364, 512, 312, 108, 24, 4, 0, 0, 128, 1093, 2048, 1562, 648, 171, 32, 4, 0, 0, 256, 3280, 8192, 7812, 3888, 1200, 256, 40, 5, 0
Offset: 0

Views

Author

Adi Dani, Jun 29 2011

Keywords

Comments

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

Examples

			T(2,4)=12: there are 12 compositions of odd natural numbers into 2 parts <=4
  1: (0,1), (1,0);
  3: (1,2), (2,1), (0,3), (3,0);
  5: (1,4), (4,1), (2,3), (3,2);
  7: (3,4), (4,3).
The table starts
    0,  0,   0,   0,    0,    0, ... A000004;
    0,  1,   1,   2,    2,    3, ... A004526;
    0,  2,   4,   8,   12,   18, ... A007590;
    0,  4,  13,  32,   62,  108, ... A036487;
    0,  8,  40, 128,  312,  648, ... A191903;
    0, 16, 121, 512, 1562, 3888, ... A191902;
    .        .      .       .    ...
with columns: A000004, A000079, A003462, A004171, A128531, A081341, ... .
Antidiagonal triangle begins:
  0;
  0,  0;
  0,  1,   0;
  0,  2,   1,   0;
  0,  4,   4,   2,   0;
  0,  8,  13,   8,   2,   0;
  0, 16,  40,  32,  12,   3,  0;
  0, 32, 121, 128,  62,  18,  3,  0;
  0, 64, 364, 512, 312, 108, 24,  4,  0;
		

Crossrefs

Programs

  • Magma
    A192396:= func< n,k | Floor(((k+1)^n - (1+(-1)^k)/2)/2) >;
    [A192396(n-k,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 11 2023
    
  • Maple
    A192396 := proc(n,k) (k+1)^n-(1+(-1)^k)/2 ; floor(%/2) ; end proc:
    seq(seq( A192396(d-k,k),k=0..d),d=0..10) ; # R. J. Mathar, Jun 30 2011
  • Mathematica
    T[n_, k_]:= Floor[((k+1)^n - (1+(-1)^k)/2)/2];
    Table[T[n-k,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A192396(n,k): return ((k+1)^n - ((k+1)%2))//2
    flatten([[A192396(n-k,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 11 2023
Showing 1-2 of 2 results.