login
A376682
Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the noncomposite numbers (A008578).
12
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
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
The version for modern primes (A000040) is A095195.
Initial rows: A008578, A075526, A036263 with 0 prepended.
Column n = 1 is A030016 (modern A007442).
A version for partitions is A175804, cf. A053445, A281425, A320590.
Antidiagonal-sums are A376683 (modern A140119), absolute A376684 (modern A376681).
First position of 0 is A376855 (modern A376678).
For composite instead of prime we have A377033.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
For prime-power instead of composite we have A377051.
A000040 lists the primes, differences A001223, second A036263.
Sequence in context: A334318 A199056 A377038 * A350004 A144966 A320000
KEYWORD
sign,tabl
AUTHOR
Gus Wiseman, Oct 15 2024
STATUS
approved