Skip to main content
fixed bracket accidentally deleted in editing
Source Link

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],     (* Table f of n *)
 {n, 1, 10, 1}] (* n from 1 to 10 by 1 *)
ListLogPlot[%]  (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

log plot of values

###Linguistic Distinctiveness Bonus Haiku (inspired by @cormullion)

Rewrite any term
High-level functions abound —
Mathematica

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

log plot of values

###Linguistic Distinctiveness Bonus Haiku (inspired by @cormullion)

Rewrite any term
High-level functions abound —
Mathematica

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],     (* Table f of n *)
 {n, 1, 10, 1}] (* n from 1 to 10 by 1 *)
ListLogPlot[%]  (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

log plot of values

###Linguistic Distinctiveness Bonus Haiku (inspired by @cormullion)

Rewrite any term
High-level functions abound —
Mathematica
Added bonus haiku
Source Link

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

enter image description herelog plot of values

###Linguistic Distinctiveness Bonus Haiku (inspired by @cormullion)

Rewrite any term
High-level functions abound —
Mathematica

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

enter image description here

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

log plot of values

###Linguistic Distinctiveness Bonus Haiku (inspired by @cormullion)

Rewrite any term
High-level functions abound —
Mathematica
Added testing.
Source Link

##Mathematica#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

enter image description here

##Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

#Mathematica

f[x_]:=     (* f of x defined *)
 x f[x-1]   (* x times f of x less 1 *)
f[1]=1      (* Mogami River *) 

Pedants may read the last line as "f of 1 is 1", but I couldn't resist the shout-out to Basho.

###Testing:

Table[f[n],    (* Table f of n *)
 {n, 1, 10, 1} (* n from 1 to 10 by 1 *)
ListLogPlot[%] (* ListLogPlot output *)

###Returning:

(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

enter image description here

Source Link
Loading