An AbacusEducalc.net Pte Ltd - HP Calculator HP Calculators = Quality you can count on.
Jump to: What's new here? Comments & Talk Back
Home » HP 40gs » HP 40gs CAS » CAS Equation Writer » 

CAS Equation Writer ALGB menu DEF

Define a function

For its argument, DEF takes an equality between:

1. the name of a function (with parentheses containing the variable), and
2. an expression defining the function.

DEF defines this function and returns the equality.

Typing:
DEF(U(N) = 2N+1)
Press [ENTER] produces the result:
U(N) = 2N+1

Typing:
U(3)
then Press [ENTER], it returns:
7

Example:

Calculate the first six Fermat numbers F1...F6 and determine whether they are prime.  So, you want to calculate:
F(k) = 22k Typing the formula:

gives a result of 17. You can then invoke the ISPRIME?() command, which is found in the MATH key Integer menu. The response is 1, which means TRUE. Using the history (which you access by pressing the SYMB key), you put the expression into the Equation Writer with ECHO, and change it to:
Or better, define a function F(K) by selecting DEF from the
ALGB menu on the menu bar and type:
The response is and F is now listed amongst the
variables (which you can verify using the VARS key).
For K=5, you then type:
F(5) Fk( ) 22
k
1+=
22
2
1+
22
2
1+
22
3
1+
DEFFK( ) 22
k
1+=( )
22
k
1+
which gives
4294967297
You can factor F(5) with FACTOR, which you�ll find in the
ALGB menu on the menu bar.

Typing:
FACTOR(F(5))

gives:
641*6700417

Typing:
F(6) 

gives:
18446744073709551617

Using FACTOR to factor it, then yields:
274177 * 67280421310721


Mail this pageMail this page


Professional Real Estate Problem Solving; Using the HP12c; More Real Estate Books...


Essential Equations for the FE Exam; Civil Engineering PE Exam; More Engineering Books...