OFFSET
0,2
COMMENTS
Row k is the k-th differences of the noncomposite numbers.
FORMULA
A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A008578(i+k).
EXAMPLE
Array begins:
n=1: n=2: n=3: n=4: n=5: n=6: n=7: n=8: n=9:
-----------------------------------------------------------
k=0: 1 2 3 5 7 11 13 17 19
k=1: 1 1 2 2 4 2 4 2 4
k=2: 0 1 0 2 -2 2 -2 2 2
k=3: 1 -1 2 -4 4 -4 4 0 -6
k=4: -2 3 -6 8 -8 8 -4 -6 14
k=5: 5 -9 14 -16 16 -12 -2 20 -28
k=6: -14 23 -30 32 -28 10 22 -48 48
k=7: 37 -53 62 -60 38 12 -70 96 -70
k=8: -90 115 -122 98 -26 -82 166 -166 86
k=9: 205 -237 220 -124 -56 248 -332 252 -86
Triangle begins:
1
2 1
3 1 0
5 2 1 1
7 2 0 -1 -2
11 4 2 2 3 5
13 2 -2 -4 -6 -9 -14
17 4 2 4 8 14 23 37
19 2 -2 -4 -8 -16 -30 -53 -90
23 4 2 4 8 16 32 62 115 205
29 6 2 0 -4 -12 -28 -60 -122 -237 -442
31 2 -4 -6 -6 -2 10 38 98 220 457 899
MATHEMATICA
nn=12;
t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1, !PrimeQ[#]&]&, 1, 2*nn], k], nn], {k, 0, nn}]
(* or *)
nn=12;
q=Table[If[n==0, 1, Prime[n]], {n, 0, 2nn}];
Table[Sum[(-1)^(j-k)*Binomial[j, k]*q[[i+k]], {k, 0, j}], {j, 0, nn}, {i, nn}]
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Gus Wiseman, Oct 15 2024
STATUS
approved