https://github.com/BuckRogers1965/Examples/blob/master/Math/additiveSeries/additiveSeries-Relationships.c
As you can see in the following example program:
#include <stdio.h>
int main () {
int i, j, n, x;
for (x=1; x<20; x++) {
printf("\tFor additive series of size %d\n", x);
printf("\tn\tadd\tseries\tformula\t\tnext\tf(n-1)\tf(n)\toffset\n");
for (i = 1, j = 0, n =1 ; n<10; n++, i+=x ){
j+=i;
printf("\t%d\t%d\t%d\t%d\t\t%d\t%d\t%d\t%d\n", n, i, j, (x*n*n-(x-2)*n)/2,
(x*(n-1)*(n-1)-(x-2)*(n-1))/2 + (x*n*n-(x-2)*n)/2 +(-x*n*n +3*x*n +n*n -3*n -2*x +2)/2,
(x*(n-1)*(n-1)-(x-2)*(n-1))/2, (x*n*n-(x-2)*n)/2, (-x*n*n +3*x*n +n*n -3*n -2*x +2)/2 );
}
printf("\n\n");
}
}
For additive series of size 1
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 2 3 3 4 1 3 0
3 3 6 6 9 3 6 0
4 4 10 10 16 6 10 0
5 5 15 15 25 10 15 0
6 6 21 21 36 15 21 0
7 7 28 28 49 21 28 0
8 8 36 36 64 28 36 0
9 9 45 45 81 36 45 0
For additive series of size 2
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 3 4 4 5 1 4 0
3 5 9 9 12 4 9 -1
4 7 16 16 22 9 16 -3
5 9 25 25 35 16 25 -6
6 11 36 36 51 25 36 -10
7 13 49 49 70 36 49 -15
8 15 64 64 92 49 64 -21
9 17 81 81 117 64 81 -28
For additive series of size 3
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 4 5 5 6 1 5 0
3 7 12 12 15 5 12 -2
4 10 22 22 28 12 22 -6
5 13 35 35 45 22 35 -12
6 16 51 51 66 35 51 -20
7 19 70 70 91 51 70 -30
8 22 92 92 120 70 92 -42
9 25 117 117 153 92 117 -56
For additive series of size 4
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 5 6 6 7 1 6 0
3 9 15 15 18 6 15 -3
4 13 28 28 34 15 28 -9
5 17 45 45 55 28 45 -18
6 21 66 66 81 45 66 -30
7 25 91 91 112 66 91 -45
8 29 120 120 148 91 120 -63
9 33 153 153 189 120 153 -84
For additive series of size 5
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 6 7 7 8 1 7 0
3 11 18 18 21 7 18 -4
4 16 34 34 40 18 34 -12
5 21 55 55 65 34 55 -24
6 26 81 81 96 55 81 -40
7 31 112 112 133 81 112 -60
8 36 148 148 176 112 148 -84
9 41 189 189 225 148 189 -112
For additive series of size 6
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 7 8 8 9 1 8 0
3 13 21 21 24 8 21 -5
4 19 40 40 46 21 40 -15
5 25 65 65 75 40 65 -30
6 31 96 96 111 65 96 -50
7 37 133 133 154 96 133 -75
8 43 176 176 204 133 176 -105
9 49 225 225 261 176 225 -140
For additive series of size 7
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 8 9 9 10 1 9 0
3 15 24 24 27 9 24 -6
4 22 46 46 52 24 46 -18
5 29 75 75 85 46 75 -36
6 36 111 111 126 75 111 -60
7 43 154 154 175 111 154 -90
8 50 204 204 232 154 204 -126
9 57 261 261 297 204 261 -168
For additive series of size 8
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 9 10 10 11 1 10 0
3 17 27 27 30 10 27 -7
4 25 52 52 58 27 52 -21
5 33 85 85 95 52 85 -42
6 41 126 126 141 85 126 -70
7 49 175 175 196 126 175 -105
8 57 232 232 260 175 232 -147
9 65 297 297 333 232 297 -196
For additive series of size 9
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 10 11 11 12 1 11 0
3 19 30 30 33 11 30 -8
4 28 58 58 64 30 58 -24
5 37 95 95 105 58 95 -48
6 46 141 141 156 95 141 -80
7 55 196 196 217 141 196 -120
8 64 260 260 288 196 260 -168
9 73 333 333 369 260 333 -224
For additive series of size 10
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 11 12 12 13 1 12 0
3 21 33 33 36 12 33 -9
4 31 64 64 70 33 64 -27
5 41 105 105 115 64 105 -54
6 51 156 156 171 105 156 -90
7 61 217 217 238 156 217 -135
8 71 288 288 316 217 288 -189
9 81 369 369 405 288 369 -252
For additive series of size 11
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 12 13 13 14 1 13 0
3 23 36 36 39 13 36 -10
4 34 70 70 76 36 70 -30
5 45 115 115 125 70 115 -60
6 56 171 171 186 115 171 -100
7 67 238 238 259 171 238 -150
8 78 316 316 344 238 316 -210
9 89 405 405 441 316 405 -280
For additive series of size 12
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 13 14 14 15 1 14 0
3 25 39 39 42 14 39 -11
4 37 76 76 82 39 76 -33
5 49 125 125 135 76 125 -66
6 61 186 186 201 125 186 -110
7 73 259 259 280 186 259 -165
8 85 344 344 372 259 344 -231
9 97 441 441 477 344 441 -308
For additive series of size 13
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 14 15 15 16 1 15 0
3 27 42 42 45 15 42 -12
4 40 82 82 88 42 82 -36
5 53 135 135 145 82 135 -72
6 66 201 201 216 135 201 -120
7 79 280 280 301 201 280 -180
8 92 372 372 400 280 372 -252
9 105 477 477 513 372 477 -336
For additive series of size 14
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 15 16 16 17 1 16 0
3 29 45 45 48 16 45 -13
4 43 88 88 94 45 88 -39
5 57 145 145 155 88 145 -78
6 71 216 216 231 145 216 -130
7 85 301 301 322 216 301 -195
8 99 400 400 428 301 400 -273
9 113 513 513 549 400 513 -364
For additive series of size 15
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 16 17 17 18 1 17 0
3 31 48 48 51 17 48 -14
4 46 94 94 100 48 94 -42
5 61 155 155 165 94 155 -84
6 76 231 231 246 155 231 -140
7 91 322 322 343 231 322 -210
8 106 428 428 456 322 428 -294
9 121 549 549 585 428 549 -392
For additive series of size 16
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 17 18 18 19 1 18 0
3 33 51 51 54 18 51 -15
4 49 100 100 106 51 100 -45
5 65 165 165 175 100 165 -90
6 81 246 246 261 165 246 -150
7 97 343 343 364 246 343 -225
8 113 456 456 484 343 456 -315
9 129 585 585 621 456 585 -420
For additive series of size 17
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 18 19 19 20 1 19 0
3 35 54 54 57 19 54 -16
4 52 106 106 112 54 106 -48
5 69 175 175 185 106 175 -96
6 86 261 261 276 175 261 -160
7 103 364 364 385 261 364 -240
8 120 484 484 512 364 484 -336
9 137 621 621 657 484 621 -448
For additive series of size 18
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 19 20 20 21 1 20 0
3 37 57 57 60 20 57 -17
4 55 112 112 118 57 112 -51
5 73 185 185 195 112 185 -102
6 91 276 276 291 185 276 -170
7 109 385 385 406 276 385 -255
8 127 512 512 540 385 512 -357
9 145 657 657 693 512 657 -476
For additive series of size 19
n add series formula next f(n-1) f(n) offset
1 1 1 1 1 0 1 0
2 20 21 21 22 1 21 0
3 39 60 60 63 21 60 -18
4 58 118 118 124 60 118 -54
5 77 195 195 205 118 195 -108
6 96 291 291 306 195 291 -180
7 115 406 406 427 291 406 -270
8 134 540 540 568 406 540 -378
9 153 693 693 729 540 693 -504
No comments:
Post a Comment