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

A201552 Square array read by diagonals: T(n,k) = number of arrays of n integers in -k..k with sum equal to 0.

Original entry on oeis.org

1, 1, 3, 1, 5, 7, 1, 7, 19, 19, 1, 9, 37, 85, 51, 1, 11, 61, 231, 381, 141, 1, 13, 91, 489, 1451, 1751, 393, 1, 15, 127, 891, 3951, 9331, 8135, 1107, 1, 17, 169, 1469, 8801, 32661, 60691, 38165, 3139, 1, 19, 217, 2255, 17151, 88913, 273127, 398567, 180325, 8953, 1
Offset: 1

Views

Author

R. H. Hardin, Dec 02 2011

Keywords

Comments

Equivalently, the number of compositions of n*(k + 1) into n parts with maximum part size 2*k+1. - Andrew Howroyd, Oct 14 2017

Examples

			Some solutions for n=7, k=3:
..1...-2....1...-1....1...-3....0....0....1....2....3...-3....0....2....1....0
.-1....2...-2....2....2....2...-1....0....2....2...-2...-1...-2...-1....2...-1
.-3...-1....1...-3....2....1....0....1....3....0....2....0...-1....2...-2...-1
..0....3....3....3...-2...-2....3....3...-3...-3....0...-1...-1...-1....0....3
..2...-1...-1...-1...-3....0...-3...-2....1...-1...-1....1....1....0....3...-1
..2...-1...-3....0....2....3....0....1...-2....1....1....1....3...-2...-3...-3
.-1....0....1....0...-2...-1....1...-3...-2...-1...-3....3....0....0...-1....3
Table starts:
.   1,      1,       1,        1,        1,         1,...
.   3,      5,       7,        9,       11,        13,...
.   7,     19,      37,       61,       91,       127,...
.  19,     85,     231,      489,      891,      1469,...
.  51,    381,    1451,     3951,     8801,     17151,...
. 141,   1751,    9331,    32661,    88913,    204763,...
. 393,   8135,   60691,   273127,   908755,   2473325,...
.1107,  38165,  398567,  2306025,  9377467,  30162301,...
.3139, 180325, 2636263, 19610233, 97464799, 370487485,...
		

Crossrefs

Programs

  • Maple
    seq(print(seq(add((-1)^i*binomial(n, i)*binomial((k+1)*n-(2*k+1)*i-1, n-1), i = 0..floor((1/2)*n)), k = 1..10)), n = 1..10); # Peter Bala, Oct 16 2024
  • Mathematica
    comps[r_, m_, k_] := Sum[(-1)^i*Binomial[r - 1 - i*m, k - 1]*Binomial[k, i], {i, 0, Floor[(r - k)/m]}];  T[n_, k_] := comps[n*(k + 1), 2*k + 1, n]; Table[T[n - k + 1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 31 2017, after Andrew Howroyd *)
  • PARI
    comps(r, m, k)=sum(i=0, floor((r-k)/m), (-1)^i*binomial(r-1-i*m, k-1)*binomial(k, i));
    T(n,k) = comps(n*(k+1), 2*k+1, n); \\ Andrew Howroyd, Oct 14 2017

Formula

Empirical: T(n,k) = Sum_{i=0..floor(k*n/(2*k+1))} (-1)^i*binomial(n,i)* binomial((k+1)*n-(2*k+1)*i-1,n-1).
The above empirical formula is true and can be derived from the formula for the number of compositions with given number of parts and maximum part size. - Andrew Howroyd, Oct 14 2017
Empirical for rows:
T(1,k) = 1
T(2,k) = 2*k + 1
T(3,k) = 3*k^2 + 3*k + 1
T(4,k) = (16/3)*k^3 + 8*k^2 + (14/3)*k + 1
T(5,k) = (115/12)*k^4 + (115/6)*k^3 + (185/12)*k^2 + (35/6)*k + 1
T(6,k) = (88/5)*k^5 + 44*k^4 + 46*k^3 + 25*k^2 + (37/5)*k + 1
T(7,k) = (5887/180)*k^6 + (5887/60)*k^5 + (2275/18)*k^4 + (357/4)*k^3 + (6643/180)*k^2 + (259/30)*k + 1
T(m,k) = (1/Pi)*integral_{x=0..Pi} (sin((k+1/2)x)/sin(x/2))^m dx; for the proof see Dirichlet Kernel link; so f(m,n) = (1/Pi)*integral_{x=0..Pi} (Sum_{k=-n..n} exp(I*k*x))^m dx = sum(integral(exp(I(k_1+...+k_m).x),x=0..Pi)/Pi,{k_1,...,k_m=-n..n}) = sum(delta_0(k1+...+k_m),{k_1,...,k_m=-n..n}) = number of arrays of m integers in -n..n with sum zero. - Yalcin Aktar, Dec 03 2011
T(n, k) = the constant term in the expansion of (x^(-k) + ... + x^(-1) + 1 + x + ... + x^k)^n = the coefficient of x^(k*n) (i.e., the central coefficient) in the expansion of (1 + x + ... + x^(2*k))^n = the coefficient of x^(k*n) in the expansion of ( (1 - x^(2*k+1))/(1 - x) )^n. Expanding the binomials and collecting terms gives the empirical formula above. - Peter Bala, Oct 16 2024

A110907 Number of points in the standard root system version of the D_3 (or f.c.c.) lattice having L_infinity norm n.

Original entry on oeis.org

1, 12, 50, 108, 194, 300, 434, 588, 770, 972, 1202, 1452, 1730, 2028, 2354, 2700, 3074, 3468, 3890, 4332, 4802, 5292, 5810, 6348, 6914, 7500, 8114, 8748, 9410, 10092, 10802, 11532, 12290, 13068, 13874, 14700, 15554, 16428, 17330, 18252, 19202
Offset: 0

Views

Author

N. J. A. Sloane, Apr 15 2008

Keywords

Comments

This lattice consists of all points (x,y,z) where x,y,z are integers with an even sum.
The L_infinity norm of a vector is the largest component in absolute value.
The sequence for the D_k lattice has the terms ((2*n+1)^k-(2*n-1)^k)/2, if k is even, and the terms ((2n+1)^k-(2*n-1)^k)/2+(-1)^n if k is odd (like here for k=3). The sequence for A_2 is A008458, for A_3 A010006, for A_4 the first differences of A083669. A_5 is 2+2*n^2*(25+44*n^2) if n>0, and 1 if n=0. - R. J. Mathar, Feb 09 2010

Examples

			a(0) = 1: 000
a(1) = 12: +-1 +-1 0, where the 0 can be in any of the three coordinates
a(2) = 50: +-2 0 0 (6), +-2 +-1 +-1 (24), +-2 +-2 0 (12), +-2 +-2 +-2 (8).
		

References

  • J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, Chap. 4.

Crossrefs

Cf. A117216, A022144, A010014, A175112 (D_5), A175114 (D_6).

Programs

  • Maple
    A110907 := proc(n) a :=0 ; for x from -n to n do for y from -n to n do for z from -n to n do if type(x+y+z,'even') then m := max( abs(x),abs(y),abs(z)) ; if m = n then a := a+1 ; end if; end if; end do ; end do ; end do ; a ; end proc: seq(A110907(n),n=0..40) ; # R. J. Mathar, Feb 03 2010
  • Mathematica
    a[0] = 1; a[n_] := 1 + (-1)^n + 12*n^2;
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 16 2017, after R. J. Mathar *)

Formula

From R. J. Mathar, Feb 03 2010: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n>4.
a(n) = 1 + (-1)^n + 12*n^2, n>0.
G.f.: 1 - 2*x*(6 + 13*x + 4*x^2 + x^3)/((1+x)*(x-1)^3). (End)

Extensions

I would like to get analogous sequences for A_2, A_4, A_5, ..., D_4 (see A117216), D_5, ..., E_6, E_7, E_8.
Extended by R. J. Mathar, Feb 03 2010
Removed the "conjectured" attribute from formulas - R. J. Mathar, Feb 27 2010

A318119 Constant term in the expansion of (Sum_{k=0..n} k*(x^k + x^(-k)))^5.

Original entry on oeis.org

0, 0, 560, 14240, 146680, 922680, 4226040, 15492680, 48144680, 131678360, 325322360, 739761880, 1570082800, 3143824320, 5988841040, 10926565040, 19197225520, 32624627920, 53829216160, 86499340720, 135731931720, 208455129960, 313946860040, 464464838200
Offset: 0

Views

Author

Seiichi Manyama, Dec 16 2018

Keywords

Crossrefs

Column 5 of A322549.
Cf. A083669.

Programs

  • GAP
    List([0..25],n->(n-1)*n*(n+1)*(2*n+1)*(967*n^5+3868*n^4+6005*n^3+5444*n^2+2844*n+1008)/9072); # Muniru A Asiru, Dec 16 2018
  • Mathematica
    a[n_] := Coefficient[Expand[Sum[k * (x^k + x^(-k)), {k, 0, n}]^5], x, 0]; Array[a, 30, 0] (* Amiram Eldar, Dec 16 2018 *)
    LinearRecurrence[{10,-45,120,-210,252,-210,120,-45,10,-1},{0,0,560,14240,146680,922680,4226040,15492680,48144680,131678360},40] (* Harvey P. Dale, Jun 16 2025 *)
  • PARI
    {a(n) = polcoeff((sum(k=0, n, k*(x^k+x^(-k))))^5, 0, x)}
    
  • PARI
    {a(n) = (n-1)*n*(n+1)*(2*n+1)*(967*n^5+3868*n^4+6005*n^3+5444*n^2+2844*n+1008)/9072}
    

Formula

a(n) = (n-1) * n * (n+1) * (2*n+1) * (967*n^5+3868*n^4+6005*n^3+5444*n^2+2844*n+1008) / 9072.

A175197 Array A(k,n) of the number of points of the A_k lattice with maximum infinity norm n, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 6, 2, 0, 1, 18, 12, 2, 0, 1, 50, 66, 18, 2, 0, 1, 140, 330, 146, 24, 2, 0, 1, 392, 1610, 1070, 258, 30, 2, 0, 1, 1106, 7742, 7580, 2500, 402, 36, 2, 0, 1, 3138, 37058, 52556, 23330, 4850, 578, 42, 2, 0, 1, 8952, 177186, 360402, 212436, 56252, 8350, 786
Offset: 0

Views

Author

R. J. Mathar, Mar 02 2010

Keywords

Comments

The values are computed starting with an auxiliary array which places the centered trinomial numbers A002426, the centered pentanomial numbers A005191, the centered 7-nomial numbers A025012 etc. into separate columns:
.1,....1,......1,.......1,........1,........1,.........1,.........1,.........1
.1,....3,......5,.......7,........9,.......11,........13,........15,........17
.1,....7,.....19,......37,.......61,.......91,.......127,.......169,.......217
.1,...19,.....85,.....231,......489,......891,......1469,......2255,......3281
.1,...51,....381,....1451,.....3951,.....8801,.....17151,.....30381,.....50101
.1,..141,...1751,....9331,....32661,....88913,....204763,....418503,....782153
.1,..393,...8135,...60691,...273127,...908755,...2473325,...5832765,..12354469
.1,.1107,..38165,..398567,..2306025,..9377467,..30162301,..82073295,.197018321
.1,.3139,.180325,.2636263,.19610233,.97464799,.370487485,1163205475,3164588407
This is a subarray of A077042. Rows are A005408, A003215, A063496, A083669 (see A077044) etc. The array A(k,n) is the first differences along each row of this auxiliary array.

Examples

			A(k,n) starts in row k=0, column n=0 as:
1,....0,......0,.......0,........0,........0,.........0,.........0,.........0
1,....2,......2,.......2,........2,........2,.........2,.........2,.........2
1,....6,.....12,......18,.......24,.......30,........36,........42,........48
1,...18,.....66,.....146,......258,......402,.......578,.......786,......1026
1,...50,....330,....1070,.....2500,.....4850,......8350,.....13230,.....19720
1,..140,...1610,....7580,....23330,....56252,....115850,....213740,....363650
1,..392,...7742,...52556,...212436,...635628,...1564570,...3359440,...6521704
1,.1106,..37058,..360402,..1907458,..7071442,..20784834,..51910994,.114945026
1,.3138,.177186,.2455938,.16973970,.77854566,.273022686,.792717990,2001382932
		

Crossrefs

Cf. A008458 (row k=2), A010006 (row k=3), A110907.
Showing 1-4 of 4 results.