A239738 Triangle read by rows: T(n,k) is the number of n-tuples with sum k + n whose i-th element is a positive integer <= prime(i), 0 <= k < A070826(n).
1, 1, 2, 1, 3, 5, 6, 1, 4, 9, 15, 21, 26, 29, 1, 5, 14, 29, 50, 76, 105, 134, 160, 181, 196, 204, 1, 6, 20, 49, 99, 175, 280, 414, 574, 755, 951, 1155, 1359, 1554, 1730, 1876, 1981, 2036, 1, 7, 27, 76, 175, 350, 630, 1044, 1618, 2373, 3324, 4479, 5838, 7392, 9122, 10998, 12979, 15014, 17044, 19005, 20832, 22463, 23842, 24921, 25662, 26039
Offset: 1
Examples
Triangle T(n,k) begins: (n >= 1, k >= 0) 1; 1, 2; 1, 3, 5, 6; 1, 4, 9, 15, 21, 26, 29; 1, 5, 14, 29, 50, 76, 105, 134, 160, 181, 196, 204; 1, 6, 20, 49, 99, 175, 280, 414, 574, 755, 951, 1155, 1359, 1554, 1730, 1876, 1981, 2036; ... T(3, 2) = 5 because the following 3-tuples have sum 2 + 3 = 5: (1,1,3), (1,2,2), (1,3,1), (2,1,2), (2,2,1). The tuple (3,1,1) is excluded because the 1st term is required to be no greater than prime(1) = 2.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..2005 (rows 1..20)
- Mikhail Gaichenkov, Normal distributions from the primes and its generation function, Mathematics StackExchange, 2023.
Programs
-
Mathematica
row[r_]:=Drop[#,-Length[#]/2]&[Transpose[Tally[Total[Tuples[Table[Range[1,Prime[k]],{k,1,r}]],{2}]]][[2]]] (* generates row r of the table *) Grid@Table[row[r],{r,1,7}] (* generates the table *) Flatten@Table[row[r],{r,1,7}] (* generates the sequence *) (* Steven Foster Clark, Feb 02 2023 *) row[r_]:=Drop[#,-Length[#]/2]&[CoefficientList[1/(x-1)^r Product[(x^Prime[i]-1),{i,1,r}],x]] (* generates row r of the table *) (* Steven Foster Clark, Feb 07 2023 *)
-
PARI
row(n)={my(v=Vecrev(prod(i=1, n, 1 - x^prime(i))/(1 - x)^n)); v[1..#v/2]} \\ Andrew Howroyd, Feb 06 2023
Formula
T(n,k) = [x^k] (1/(x-1)^n) * Product_{i=1..n} (x^prime(i)-1). - Steven Foster Clark, Feb 05 2023
T(n,k) = [x^k] Product_{i=1..n} Sum_{j=0..prime(i)-1} x^j. - Andrew Howroyd, Feb 05 2023
Extensions
Name edited by Andrew Howroyd, Feb 05 2023
Comments