1
$\begingroup$

[Noob warning]: I am not a mathematician. If you use jargon, please explain or reference.

Other than $f(x)=x!$, what is a univariate non-piecewise function with a domain that is either all integers, or an infinite-sized subset of all integers, and whose range contains only integers and exactly one prime number?

For those that prefer lists, here are the criteria again:

  • Univariate (one independent variable)
  • Not $f(x)=x!$ (of which I 'think' meets the criteria below...)
  • Non-piecewise (non-hybrid)
  • Domain is either all integers or an infinite-sized subset of all integers
  • Range contains only integers
  • Range contains exactly one prime number
$\endgroup$
5
  • 3
    $\begingroup$ How is $x!$ bivariate? $\endgroup$ Feb 17, 2016 at 2:59
  • $\begingroup$ $f(x)$ is univariate. $\endgroup$
    – Rob Arthan
    Feb 17, 2016 at 2:59
  • 4
    $\begingroup$ How do you feel about constant functions? $\endgroup$ Feb 17, 2016 at 2:59
  • 1
    $\begingroup$ How about $f:\Bbb N\rightarrow\Bbb N$ given by $f(n)=p^n$ for $p$ a fixed prime. $\endgroup$ Feb 17, 2016 at 3:04
  • $\begingroup$ Even more simply than most of those given: $f(x) = px$ (or $p\cdot(x+1)$, depending on how you feel about zero and where you want to start counting). There are a bunch of problems with this question: (1) there are many many such functions (in fact, $f(x) = p\cdot g(x)$ for any $g$ that's 1 somewhere and $\gt 1$ everywhere else - e.g., $g(x) = 1+(x-n)^2$ for any $n$ - also works); (2) 'non-piecewise' turns out to be a very artificial restriction to impose on functions; and (3) there's no motivation for this question - why do you want such a thing? $\endgroup$ Feb 17, 2016 at 3:21

6 Answers 6

1
$\begingroup$

How about $f:\Bbb N\rightarrow\Bbb N$ given by $f(n)=p^n$ for $p$ a fixed prime.

$\endgroup$
1
  • 1
    $\begingroup$ Or $p^{n^2}$ if you want the domain to be all of $\mathbb{Z}$. $\endgroup$ Feb 17, 2016 at 18:22
1
$\begingroup$

Your example $f(x) = x!$ is $f_1$ in the following sequence of functions that meet your requirements (with $f_n(2) = 2$ being the only prime in the range of $f_n$):

$$f_n(x) = \frac{(x!)^n}{2^{n-1}}$$

$\endgroup$
1
$\begingroup$

$$f(x)=x^2+x$$ More generally, if $g(x)$ is any function with $f(1)=p$ is prime and $f(x) \geq 2$ for all $x$ then $$f(x)=xg(x)$$

Also $$h(n)= lcm [1,2,3,..,n]$$

Also $$u(n)=n^{n-1}$$

$\endgroup$
1
$\begingroup$

$x^{x-1}$ for $x \ge 2$.

More generally, for any prime $p$, $x^{x-p+1}$ for $x \ge p$.

$\endgroup$
1
$\begingroup$

$f(n)= (n-1) \cdot( n^2-1 \mod 4)$

$\endgroup$
1
$\begingroup$

$f(x)=x$ with a domain of "all composite integers together with 11".

$f(x)=7$

$f(x)=x^2-x$

$\endgroup$
1
  • $\begingroup$ this answer does not really explain the "jargon" in the question, please improve (this answer was flagged as being low quality and I was reviewing low quality posts) $\endgroup$
    – Willemien
    Feb 17, 2016 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .