Zulip Chat Archive

Stream: new members

Topic: proper way to denote a function f(n) vs f_n


rzeta0 (Jan 06 2025 at 16:16):

Which is the proper way to denote a function? The following compares f(n)f(n) with fnf_n.

I'm not formally trained maths so I've been writing functions without thinking about it.

The reason I ask is because I've seen sequence elements denoted using the subscript format, eg ana_n, so fnf_n might be strictly seen as the nthn^{th} element of the sequence generated by a function ff. I don't really know.


fn={0  if n=02n1+fn1  otherwisef_{n}=\begin{cases} \:0 & \;\text{if }n=0\\ \:2n-1+f_{n-1} & \;\text{otherwise} \end{cases}

or

f(n)={0  if n=02n1+f(n1)  otherwisef(n)=\begin{cases} \:0 & \;\text{if }n=0\\ \:2n-1+f(n-1) & \;\text{otherwise} \end{cases}

Aesthetically , I find the first form above easier on the eye.

rzeta0 (Jan 06 2025 at 16:17):

I notice also the Lean aware editors allow subscripting too.

Philippe Duchon (Jan 06 2025 at 16:27):

There is no "right" way to do it. The fnf_n subscript notation is traditionnally used for sequences, and the f(n)f(n) parenthesized notation, for "functions"; but sequences are just functions from the naturals, so the distinction is arbitrary.


Last updated: May 02 2025 at 03:31 UTC