answersLogoWhite

0

AllQ&AStudy Guides
Best answer

n(n+1)/2

You can see this from the following:

Let x=1+2+3+...+n

This is the same as x=n+(n-1)+...+1

x=1+2+3+...+n

x=n+(n-1)+...+1

If you add the corresponding terms on the right-hand side of the two equations together, they each equal n+1 (e.g., 1+n=n+1, 2+n-1=n+1, ..., n+1=n+1). There are n such terms. So adding the each of the left-hand sides and right-hand sides of the two equations, we get:

x+x=(n+1)+(n+1)+...+(n+1) [with n (n+1) terms on the right-hand side

2x=n*(n+1)

x=n*(n+1)/2

A more formal proof by induction is also possible:

(1) The formula works for n=1 because 1=1*2/2.

(2) Assume that it works for an integer k.

(3) Now show that given the assumption that it works for k, it must also work for k+1.

By assmuption, 1+2+3+...+k=k(k+1)/2. Adding k+1 to each side, we get:

1+2+3+...+k+(k=1)=k(k+1)/2+(k+1)=k(k+1)/2+2(k+1)/2=(k(k+1)+2(k+1))/2=((k+2)(k+1))/2=(((k+1)+1)(k+1))/2=((k+1)((k+1)+1)/2

This answer is:
Related answers

n(n+1)/2

You can see this from the following:

Let x=1+2+3+...+n

This is the same as x=n+(n-1)+...+1

x=1+2+3+...+n

x=n+(n-1)+...+1

If you add the corresponding terms on the right-hand side of the two equations together, they each equal n+1 (e.g., 1+n=n+1, 2+n-1=n+1, ..., n+1=n+1). There are n such terms. So adding the each of the left-hand sides and right-hand sides of the two equations, we get:

x+x=(n+1)+(n+1)+...+(n+1) [with n (n+1) terms on the right-hand side

2x=n*(n+1)

x=n*(n+1)/2

A more formal proof by induction is also possible:

(1) The formula works for n=1 because 1=1*2/2.

(2) Assume that it works for an integer k.

(3) Now show that given the assumption that it works for k, it must also work for k+1.

By assmuption, 1+2+3+...+k=k(k+1)/2. Adding k+1 to each side, we get:

1+2+3+...+k+(k=1)=k(k+1)/2+(k+1)=k(k+1)/2+2(k+1)/2=(k(k+1)+2(k+1))/2=((k+2)(k+1))/2=(((k+1)+1)(k+1))/2=((k+1)((k+1)+1)/2

View page

#include<stdio.h>

#include<stdlib.h>

#include<math.h>

#include<conio.h>

void main(void)

{

int K, P, C, J;

double A[100][101];

int N;

int Row[100];

double X[100];

double SUM, M;

int T;

do

{

printf("Please enter number of equations [Not more than %d]\n",100);

scanf("%d", &N);

} while( N > 100);

printf("You say there are %d equations.\n", N);

printf("From AX = B enter elements of [A,B] row by row:\n");

for (K = 1; K <= N; K++)

{

for (J = 1; J <= N+1; J++)

{

printf(" For row %d enter element %d please :\n", K, J);

scanf("%lf", &A[K-1][J-1]);

}

}

for (J = 1; J<= N; J++) Row[J-1] = J - 1;

for (P = 1; P <= N - 1; P++)

{

for (K = P + 1; K <= N; K++)

{

if ( fabs(A[Row[K-1]][P-1]) > fabs(A[Row[P-1]][P-1]) )

{

T = Row[P-1];

Row[P-1] = Row[K-1];

Row[K-1] = T;

}

}

if (A[Row[P-1]][P-1] 0)

{

printf("The matrix is SINGULAR !\n");

printf("Cannot use algorithm --- exit\n");

exit(1);

}

X[N-1] = A[Row[N-1]][N] / A[Row[N-1]][N-1];

for (K = N - 1; K >= 1; K--)

{

SUM = 0;

for (C = K + 1; C <= N; C++)

{

SUM += A[Row[K-1]][C-1] * X[C-1];

}

X[K-1] = ( A[Row[K-1]][N] - SUM) / A[Row[K-1]][K-1];

}

for( K = 1; K <= N; K++)

printf("X[%d] = %lf\n", K, X[K-1]);

getch();

}

View page

n=1 a(1) = 0.001

n=2 a(2) = 0.012

n=3 a(3) = 0.144

n=4 a(4) = 1.728

n=5 a(5) = 20.736

....

n=k a(k) = (12^(k-1))/1000

let n = k+1

a(k+1) = 12^(k)/1000

12(ak) = a(k+1)

12(12^k-1)/1000 = 12^k/1000

the 12 gets absorbed here.

12^(k-1+1)/1000 = 12^k/1000

Valid for k and k+1

therefore our equation

A(n) = 12^(n-1)/1000, n(greater than or equal to) 1

View page

Suppose N is a perfect number. Then N cannot be a square number and so N has an even number of factors.Suppose the factors are f(1) =1, f(2), f(3), ... , f(k-1), f(k)=N.

Furthermore f(r) * f(k+1-r) = N for r = 1, 2, ... k so that f(r) = N/f(k+1-r)

which implies that 1/f(r) = f(k+1-r)/N


Then 1/f(1) + 1/(f(2) + ... + 1/f(k)

= f(k)/N + f(k-1)/N + ... + f(1)/N

= [f(k) + f(k-1) + ... + f(1)] / N

= 2N/N since, by definition, [f(k) + f(k-1) + ... + f(1)] = 2N

View page

#include<iostream.h> #include<conio.h> void main() { clrscr(); int i,k,a[10],c[10],n,l; cout<<"Enter the no. of elements\t"; cin>>n; cout<<"\nEnter the sorted elments for optimal merge pattern"; for(i=0;i<n;i++) { cout<<"\t"; cin>>a[i]; } i=0;k=0; c[k]=a[i]+a[i+1]; i=2; while(i<n) { k++; if((c[k-1]+a[i])<=(a[i]+a[i+1])) { c[k]=c[k-1]+a[i]; } else { c[k]=a[i]+a[i+1]; i=i+2; while(i<n) { k++; if((c[k-1]+a[i])<=(c[k-2]+a[i])) { c[k]=c[k-1]+a[i]; } else { c[k]=c[k-2]+a[i]; }i++; } }i++; } k++; c[k]=c[k-1]+c[k-2]; cout<<"\n\nThe optimal sum are as follows......\n\n"; for(k=0;k<n-1;k++) { cout<<c[k]<<"\t"; } l=0; for(k=0;k<n-1;k++) { l=l+c[k]; } cout<<"\n\n The external path length is ......"<<l; getch(); }

View page
Featured study guide
📓
See all Study Guides
✍️
Create a Study Guide
Search results