If I have a list of 5 numbers each of them following another [1,2,3,4,5] and I want to multiply all of them together.
How do I write (1*2)+(1*3)+(1*4)+(1*5)+(2*3)+(2*4)+(2*5)+(3*4)+(3*5)+(4*5)
But with 4000 numbers in the list instead of 5 without having to write every instance out?
Is it possible to make a rule and calculate it in a common calculator?
Table:
multiply123451123452246810336912154481216205510152025sum1530456075arithmetical sequence
Let the sum of all numbers in the table S=15+30+45+60+75=225Let the sum we are looking for s=(1∗2)+(1∗3)+(1∗4)+(1∗5)+(2∗3)+(2∗4)+(2∗5)+(3∗4)+(3∗5)+(4∗5)=2+3+4+5+6+8+10+12+15+20=85Let the sum of all square numbers in the diagonal of the table q=1+4+9+16+25=55
So we see the formula: S=2s+q or s=12⋅(S−q)
S= ?
an=a1+(n−1)d|d=a1=a1+(n−1)a1=a1+na1−a1=na1|a1=(1+n)n2=(1+n)n22S=(a1+an)⋅n2=((1+n)n2+(1+n)n22)⋅n2=((1+n)+(1+n)n)⋅n24=(n2+2n+1)⋅n24=(n+1)2⋅n24S=[(n+1)⋅n2]2
q= ?
q=(n+1)⋅n2⋅(2n+1)3|from the formula collection
s= ?
s=12⋅(S−q)=12⋅([(n+1)⋅n2]2−(n+1)⋅n2⋅(2n+1)3)=(n+1)⋅n4⋅[(n+1)⋅n2−(2n+1)3]=(n+1)⋅n24⋅[3n(n+1)−2(2n+1)]=(n+1)⋅n⋅(3n2−n−2)24=(n+1)⋅n⋅(3n+2)⋅(n−1)24s=(n−1)⋅n⋅(n+1)⋅(3n+2)24
Example: [1,2,3,4,5]
So n=5
s=(5−1)⋅5⋅(5+1)⋅(3⋅5+2)24=4⋅5⋅6⋅1724=5⋅17=85 ✓
Example:[1,2,3,4,5,…,4000]
So n=4000
s=(4000−1)⋅4000⋅(4000+1)⋅(3⋅4000+2)24=3999⋅4000⋅4001⋅1200224=1333⋅1000⋅4001⋅6001=32 005 331 333 000
