Print a series

Default Image

Code to display a series by the use of Vb-script or ASP to print the following series:

3,5,9,17,…..


In this first we focus how is this series
is going to be generated. It is an exponential series of two and adding
1 in every result. First digit of this series is 3 and we will get it
by 2^1+1 and next digit is 5 that will be generated by 2^2+1 next one is
9 that will be get by 2^3+1 and so on. Now we have some rough idea to
solve this problem as 2i+1 where i=1 to n. Let’s write down its solution:




To get complete source file you can click on this link to print a series contains 2?s power plus 1 in every number.


To get same functionality in VB-Script we will write in this way.

Read Count: 3 times

Comments

No comments yet.

Leave a Comment