login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180174 Triangle read by rows of the numbers C(n,k) of k-subsets of a quadratically populated n-multiset M. 1

%I #7 Dec 16 2014 15:05:23

%S 1,1,1,1,2,2,2,2,1,1,3,5,7,9,10,10,10,10,10,9,7,5,3,1,1,4,9,16,25,35,

%T 45,55,65,75,84,91,96,99,100,100,100,99,96,91,84,75,65,55,45,35,25,16,

%U 9,4,1,1,5,14,30,55,90,135,190,255,330,414,505,601,700,800,900,1000,1099

%N Triangle read by rows of the numbers C(n,k) of k-subsets of a quadratically populated n-multiset M.

%C The multiplicity m(i) of the i-th element with 1 <= i <= n is m(i)=i^2.

%C Thus M=[1,2,2,2,2,...,i^2 x i,...,n^2 x n].

%C Row sum is equal to A028361.

%C Column for k=2 is equal to AA000096.

%C Column for k=3 is equal to AA005581.

%C Column for k=4 is equal to AA005582.

%C The number of coefficients C(n,k) for given n is equal to A056520.

%F C(0,0) = 0.

%F C(n,k) = sum_{j=(k-LS+1)}^{k} C(n-1,j).

%F for n > 0 and k=1,...,LR with LS = n^2+1 and LR = n*(n+1)*(2*n+1)/6.

%F C(n,k) = C(n,LR-k).

%e For n=4 one has M=[1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4].

%e For k=7 we have 55 subsets from M:

%e [1, 2, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4],

%e [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 2, 3, 4, 4],

%e [1, 2, 2, 2, 3, 3, 4], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4],

%e [2, 2, 2, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 4, 4, 4],

%e [1, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4, 4], [2, 2, 2, 3, 4, 4, 4],

%e [2, 2, 2, 3, 3, 3, 4], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 3, 3, 3, 4],

%e [1, 2, 2, 2, 2, 3, 4], [1, 2, 2, 3, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3],

%e [1, 2, 2, 4, 4, 4, 4], [1, 2, 2, 2, 2, 4, 4], [1, 3, 3, 4, 4, 4, 4],

%e [1, 3, 3, 3, 3, 4, 4], [2, 3, 3, 4, 4, 4, 4], [2, 3, 3, 3, 3, 4, 4],

%e [2, 2, 3, 4, 4, 4, 4], [2, 2, 3, 3, 3, 3, 4], [2, 2, 2, 2, 3, 4, 4],

%e [2, 2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3],

%e [2, 2, 2, 4, 4, 4, 4], [2, 2, 2, 2, 4, 4, 4], [3, 3, 3, 4, 4, 4, 4],

%e [3, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 3, 3], [1, 2, 4, 4, 4, 4, 4],

%e [1, 3, 4, 4, 4, 4, 4], [1, 3, 3, 3, 3, 3, 4], [2, 3, 4, 4, 4, 4, 4],

%e [2, 3, 3, 3, 3, 3, 4], [2, 2, 3, 3, 3, 3, 3], [2, 2, 4, 4, 4, 4, 4],

%e [3, 3, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 4, 4], [1, 3, 3, 3, 3, 3, 3],

%e [1, 4, 4, 4, 4, 4, 4], [2, 3, 3, 3, 3, 3, 3], [2, 4, 4, 4, 4, 4, 4],

%e [3, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 4], [3, 3, 3, 3, 3, 3, 3],

%e [4, 4, 4, 4, 4, 4, 4].

%p with(combinat)

%p kend := 4;

%p Liste := NULL;

%p for k from 0 to kend do

%p Liste := Liste, `$`(k, k^2)

%p end do;

%p Liste := [Liste];

%p for k from 0 to 2^(kend+1)-1 do

%p Teilergebnis[k] := choose(Liste, k)

%p end do;

%p seq(nops(Teilergebnis[k]), k = 0 .. 2^(kend+1)-1)

%p ' Excel VBA

%p Sub A180174()

%p Dim n As Long, nend As Long, k As Long, kk As Long, length_row As Long, length_sum As Long

%p Dim ATable(10, -1000 To 1000) As Double, Summe As Double

%p Dim offset_row As Integer, offset_column As Integer

%p Worksheets("Tabelle2").Select

%p Cells.Select

%p Selection.ClearContents

%p Range("A1").Select

%p offset_row = 1

%p offset_column = 1

%p nend = 7

%p ATable(0, 0) = 1

%p Cells(0 + offset_row, 0 + offset_column) = 1

%p For n = 1 To nend

%p length_row = n * (n + 1) * (2 * n + 1) / 6

%p length_sum = n ^ 2 + 1

%p For k = 0 To length_row / 2

%p Summe = 0

%p For kk = k - length_sum + 1 To k

%p Summe = Summe + ATable(n - 1, kk)

%p Next kk

%p ATable(n, k) = Summe

%p Cells(n + offset_row, k + offset_column) = ATable(n, k)

%p ATable(n, length_row - k) = Summe

%p Cells(n + offset_row, length_row - k + 0 + offset_column) = ATable(n, k)

%p Next k

%p Next n

%p End Sub

%Y Cf. A007318, A008302, A028361, A056520, A000096, A005581, A005582.

%K nonn,tabf

%O 0,5

%A _Thomas Wieder_, Aug 15 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)