// _Adrian Dacko_, Jan 30 2019 import java.math.*; public class A306228_program { // create the object of the class triangleOfAuxiliaryTermsVmSGDand (with parameter M) in order to generate the // triangle of terms N_{n, k} for 0<=n<=M and 1<=k<=n+1 and use the method centralLimitTheoremToString() // to display (a(0), a(1), ..., a(M)) or toString() in order to display the whole triangle public static void main(String[] args) { int M = 15; triangleOfAuxiliaryTermsVmSGD table = new triangleOfAuxiliaryTermsVmSGD(M); // displays (a(0), a(1), ..., a(M)) System.out.println(table.centralLimitTheoremToString()); // displays the whole triangle System.out.println(table.toString()); } } class triangleOfAuxiliaryTermsVmSGD { // if we use Integer, the program returns wrong values of $N_{n,k}$ for $n>9$ private BigInteger[][] choose; private BigInteger[][] vMonotone; private int M; public triangleOfAuxiliaryTermsVmSGD(int M) { if(M<1) { throw new IllegalArgumentException(); } this.M = M; int n,k; // the binomial coefficients --- by $choose[n][k]$ we mean $'n choose k'$ // for $k > n$ we put $'n choose k' = 0$ choose = new BigInteger[M+1][M+2]; // by $vMonotone[n][k]$ we mean the term $N_{n,k}$, // defined just before the formulation of Lemma 5.4. in the paper 'V-monotone independence' // $N_{n,k}$ is defined only for a non-negative integer n and $k=1,...,n+1$ // we put $vMonotone[n][k] = 0$ for $k=0,n+2,...,N+1$, for any non-negative // integer $n$ vMonotone = new BigInteger[M+1][M+2]; for(n=0; n b) { return a; } return b; } private static int min(int a, int b) { if(a < b) { return a; } return b; } public String chooseToString() { String wholeTriangle = ""; String oneRow = "("; int K; int n,k; for(n=0; n<=M; n++) { K = n; for(k=0; k<=K; k++) { oneRow = oneRow + choose[n][k].toString(); if (k