2
$\begingroup$

Puzzle:

Given a function 'solve()' that accepts a single integer parameter, and returns an integer, write a program that determines if this function is an additive function [ solve($x+y$) = solve($x$) + solve($y$) ] for prime numbers below $100$.

In this case, $f(x+y)=f(x)+f(y)$ refers to an additive function, and the prime numbers below $100$ are $2, 3,5,7,11,13,17,19,23,29,31,37,41,43,47, \cdots,97$, so does that mean if $x=2$ and $y=5$ then $f(x+y)=f(x)+f(y$) holds true, and does it remains same for all pairs of prime numbers?

Please let me know if I am wrong.

  • 0
    @Yoo No one asked a question. OP asked whether she was wrong, and was told she wasn't. If you have a question to ask, you've not gone about it very well.2012-11-09

0 Answers 0