Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me convert this into formula

Status
Not open for further replies.

smslca

Member level 1
Member level 1
Joined
Sep 9, 2007
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,656
please convert the below(P) into formula using (m), or give an algorithm using (m) to get (P)

m=2, P=0
m=3, P=3
m=4, P=3+5
m=5, P=3+5+5
m=6, P=3+5+5+7
m=7, P=3+5+5+7+9
m=8, P=3+5+5+7+9+9
m=9, P=3+5+5+7+9+9+11
m=10, P=3+5+5+7+9+9+11+13
m=11, P=3+5+5+7+9+9+11+13+13
m=12, P=3+5+5+7+9+9+11+13+13+15
m=13, P=3+5+5+7+9+9+11+13+13+15+17
m=14, P=3+5+5+7+9+9+11+13+13+15+17+17
and so on

I did not understand how to evaluate it into a formula
 

Re: convert into formula

Let n = [m/3] ; [] mean integer part
and k = m mod 3 ; mod mean modulus (remainder of the integer divide m/3)

That is:
m --> n , k
3 --> 1, 0
4 --> 1, 1
5 --> 1, 2
6 --> 2, 0
7 --> 2, 1
8 --> 2, 2
9 --> 3, 0
...............


Then P(n,k) = n*(6*n-1) + k*(4*n+1) - 2
 

convert into formula

thanks for the replies
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top