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.

A184703 T(n,k) is the number of strings of numbers x(i=1..n) in 0..k with sum i*x(i) equal to k*n.

This page as a plain text file.
%I A184703 #18 Aug 21 2023 08:23:50
%S A184703 1,1,1,1,2,2,1,2,3,2,1,3,6,7,3,1,3,9,14,12,4,1,4,12,28,34,21,5,1,4,17,
%T A184703 46,78,74,35,6,1,5,22,74,156,207,154,58,8,1,5,27,107,282,476,504,304,
%U A184703 91,10,1,6,34,154,471,985,1349,1169,580,142,12,1,6,41,208,744,1842,3142,3571,2574,1066,215,15
%N A184703 T(n,k) is the number of strings of numbers x(i=1..n) in 0..k with sum i*x(i) equal to k*n.
%C A184703 T(n,k) is the number of integer lattice points in k*P_n, where P_n is the polytope in R^n defined by the constraints 0 <= x_i <= 1 and Sum_{i=1..n} i x_i = n.  Thus for each n, T(n,k) is an Ehrhart quasi-polynomial. - _Robert Israel_, Dec 21 2022
%H A184703 R. H. Hardin, <a href="/A184703/b184703.txt">Table of n, a(n) for n = 1..2113</a>
%e A184703 Table starts:
%e A184703    1   1    1    1     1     1      1      1       1       1       1       1
%e A184703    1   2    2    3     3     4      4      5       5       6       6       7
%e A184703    2   3    6    9    12    17     22     27      34      41      48      57
%e A184703    2   7   14   28    46    74    107    154     208     278     357     456
%e A184703    3  12   34   78   156   282    471    744    1119    1623    2279    3118
%e A184703    4  21   74  207   476   985   1842   3226    5325    8414   12766   18789
%e A184703    5  35  154  504  1349  3142   6575  12688   22923   39266   64315  101460
%e A184703    6  58  304 1169  3571  9353  21713  46037   90595  167917  295811  499442
%e A184703    8  91  580 2574  8939 26146  67105 155645  332729  665317 1257898 2268061
%e A184703   10 142 1066 5439 21310 69331 195760 495251 1146377 2467215 4994696 9599863
%e A184703 Some solutions for n=5, k=4:
%e A184703   4   4   2   0   1   2   1   0   2   4   0   0   4   0   2   2
%e A184703   1   2   3   1   2   0   2   0   1   1   0   0   0   2   2   1
%e A184703   2   1   4   0   1   2   2   1   4   0   4   0   4   0   2   2
%e A184703   2   1   0   2   3   3   1   3   1   1   2   0   1   4   2   0
%e A184703   0   1   0   2   0   0   1   1   0   2   0   4   0   0   0   2
%p A184703 S:= proc(n,k,s) option remember; local j;
%p A184703   if n = 1 then
%p A184703     if s <= k then return 1 else return 0 fi
%p A184703   fi;
%p A184703   add(procname(n-1,k,s-j*n), j=0..min(s/n,k))
%p A184703 end proc:
%p A184703 [seq(seq(S(n,m-n,(m-n)*n),n=1..m-1),m=1..20)]; # _Robert Israel_, Dec 21 2022
%t A184703 S[n_, k_, s_] := S[n, k, s] = Module[{}, If[n == 1, If[s <= k, Return@1, Return@0]]; Sum[S[n - 1, k, s - j*n], {j, 0, Min[s/n, k]}]];
%t A184703 Table[Table[S[n, m - n, (m - n)*n], {n, 1, m - 1}], {m, 1, 20}] // Flatten (* _Jean-François Alcover_, Aug 21 2023, after _Robert Israel_ *)
%Y A184703 Column 1 is A000009.
%Y A184703 Row 3 is A008810(n+1).
%K A184703 nonn,tabl
%O A184703 1,5
%A A184703 _R. H. Hardin_, Jan 20 2011