Wikipedia:Reference desk/Archives/Mathematics/2023 January 23

Mathematics desk
< January 22 << Dec | January | Feb >> January 24 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 23

edit

Unlucky sum of three primes

edit

Is there a number that can be written as the sum of three odd primes in exactly 13 different ways?  --Lambiam 10:46, 23 January 2023 (UTC)[reply]

If you don't find an answer here, it sounds like your question may make a good video topic for either a Numberphile, Mathologer, or Matt Parker video. Maybe you could write to them and see if they put it in the queue. --Jayron32 13:11, 23 January 2023 (UTC)[reply]
I'm pretty sure the answer is no. I ran a quick script and couldn't find any, and based on the following argument, I think that might generally suffice.
If we take some odd number   and some odd prime  , then   is an even number greater than 4 and almost certainly (cheekily assuming Goldbach's conjecture) the sum of two odd primes  . Of course, we can't say anything about uniqueness of solutions if we don't establish some condition on   (e.g.   and  ,   is the same solution as  ,  .) Luckily though, if we consider only   between   and   inclusive, each   gives us at least one unique solution, since it would be impossible for two of the three primes summing to   to be greater than  . So the number of unique ways to have   be the sum of three primes is at least the number of primes between   and   inclusive.
I'd have to look deeper to find any heuristics on what this might be, but I'm willing to bet that it has a growth rate that leads to the nonexistence of a number that is the sum of three odd primes in 13 different ways. GalacticShoe (talk) 21:54, 23 January 2023 (UTC)[reply]
Okay, so according to Bertrand's postulate#Erdős's theorems, "Erdős proved in 1934 that for any positive integer k, there is a natural number N such that for all n > N, there are at least k primes between n and 2n." If we consider the odd number   from earlier, then since   is even, we know that after some point, there are always at least 16 primes between   and  , and removing   possible primes from   (at least one of them has to be divisible by  ) yields   primes from which we can construct solutions. In other words, we only have to search up to a finite point to find unlucky sums of three primes before they become impossible. But as to what that finite point is? No idea, I'd have to look further. GalacticShoe (talk) 21:59, 23 January 2023 (UTC)[reply]
Effective bounds were given by Ramanujan. It appears that (assuming Goldbach) there are at least   prime triplets summing up to odd   when  , in which   denotes the  -th Ramanujan prime. Since   the search can stop quite early.  --Lambiam 23:34, 23 January 2023 (UTC)[reply]

  Solved.

13 is the smallest count which doesn't occur. In PARI/GP for sums below 10000:
m=10000; v=vector(m);
forprime(p=3,m,forprime(q=p,m-p,forprime(r=q,m-p-q,v[p+q+r]++)))
v=vecsort(v); for(n=0,100,if(!setsearch(v,n),print1(n", ")))
Output: 13, 15, 17, 19, 22, 23, 26, 31, 39, 40, 41, 43, 44, 49, 51, 52, 57, 63, 65, 66, 67, 70, 71, 78, 79, 82, 83, 84, 87, 92, 94, 96, 97, 98, 99,
PrimeHunter (talk) 19:47, 28 January 2023 (UTC)[reply]

Rule of inference vs. logical consequence

edit

I think I understand the distinction between material conditional and logical consequence: A logically implies B iff AB is a tautology, right? But I must be confused, because this seems the same as the relationship between material conditional and rule of inference. (The article on rule of inference even seems to equate rules of inference with entailment in this section, and our article on logical consequence seems to take entailment as a synonym for logical consequence.) Yet Hilbert systems for propositional logic make a clear distinction between an axiom, which seems in this context to be a statement that some propositional formula is a tautology, and an inference rule. What am I missing? -Amcbride (talk) 16:03, 23 January 2023 (UTC) (EDIT: Just realized that middle section of rule of inference says it's using the sequent notation, which I'm used to seeing as entailment, specifically to emphasize the distinction between axioms and rules of inference... but in my confusion, this notation just seems to blur the distinction further.)[reply]

Inference rules and tautologies are very closely related. Let's consider modus ponens:  . There's a corresponding tautology:  . In general, any rule of inference gives rise to a tautology by writing that the conjunction of the hypotheses imply the conclusion -- this is called soundness of the rules of inference. Conversely, for tautologies of the form  , you can show   by a sequence of rules of inference -- this is completeness of the rules of inference.
An important thing to understand is that tautologies are statements in the logical language, but rules of inference are not. Rules of inference are methods of combining statements to generate new statements.
Axioms are statements, but are generally not tautologies. They are additional statements which we are asserting to be true.--2600:4040:7B33:6E00:5D8:EC09:6C4:6CA0 (talk) 17:14, 23 January 2023 (UTC)[reply]
Thanks. I think part of my confusion is that, although a tautology itself is a statement in an object language, the statement that a given tautology is indeed a tautology is a metalanguage statement. Right? It's that latter animal, the assertion that a given statement is a tautology, that I'm having trouble distinguishing from a rule of inference [EDIT: when the tautology is an implication, I mean]. (And you say axioms are not generally tautologies, but for propositional logic, they are, right?) -Amcbride (talk) 17:53, 23 January 2023 (UTC)[reply]
(edit conflict) I may not be the best person to answer this, since I, like you, have been confused by the way this is defined and discussed in the literature. Here is my try:
Given a logic (a formal system), one should distinguish between the theory   of the logic, formed by the sentences that can be proved as theorems using its rules of inference, and its "necessity"  , being the set of sentences that are true in all models of the logic. Normally, one should only allow ground terms here or variables that are bound by a quantifier; otherwise the notion of a sentence being true is unclear. If the logic is sound,   that is, all provable sentences are true in all models. If the logic is complete, the converse inclusion   holds. The easiest way (IMO) to think of the material conditional (aka "material implication") is as just a formula in the formal language of the logic, assuming it has an implication connective such as  , in which case it is a sentence   of the form   Depending on the logic and on the antecedent and consequent of  , it may or may not be an element of   and it may or may not be an element of   All four cases are possible. But if it is a member of   it gets awarded a special status, variously known as "strict implication", or "entailment", or "logical consequence". The latter term is confusing; this notion of "consequence" is in terms of the models of the logic, and is not related to its deductive system with its rules of inference. It is a semantic notion; using double turnstile notation, we can express it as    --Lambiam 17:18, 23 January 2023 (UTC)[reply]
Thank you. This gives me a lot to read. I think part of my problem may be that I don't know enough about model theory or proof theory to disentangle ideas that belong with one or the other. -Amcbride (talk) 17:59, 23 January 2023 (UTC)[reply]
You don't need to know much about model theory or proof theory, as long as you keep in mind that soundness and completeness of a formal system are different properties that both cannot be taken for granted. Being true (technically known as being a tautology, sometimes denoted "  ") and being provable (denoted with a single turnstyle as "  ") are different properties of a sentence. Consider a formal system whose only sentence is   with the understanding that we only consider standard interpretations in which this stands for the truth value “true". Then the system has only one model, and in this model   is true, so it is a tautology. If we now choose not to add any axioms or inference rules to the system, it has no theorems, so it is not only very sound but also very incomplete. Specifically, we have   but  .  --Lambiam 22:08, 23 January 2023 (UTC)[reply]
Thank you; I think this really does help me see it. To test my understanding, in the context of a typical propositional calculus, we could write:
  • " "
...a sentence in the object language
  • " "
...a sentence in metalanguage, equivalent to " "
  • "Modus ponens is a valid inference rule."
...a different sentence, also in metalanguage, equivalent to " "
Do I have that right? -Amcbride (talk) 04:44, 24 January 2023 (UTC)[reply]
Just as a distinction is made between material and logical implication, logicians make a similar distinction between material and logical equivalence. Unfortunately, there is no standard notation, and the symbol " " is used in either of the two senses. The meaning of the second bullet is therefore not clear without context. The same applies to the use of "valid" in the third bullet. Does it mean to say that modus ponens is one of the rules of the calculus (if it isn't, a derivation using this non-existent rule does not follow the rules of the game and may be considered invalid), or is the sense that given in the article Validity (logic), in which the argument "  and  , therefore  " is only considered valid when  ? The judgement " " can be called a symbolic rendering of the modus ponens rule itself (see the infobox in our Modus ponens article) – although some formal systems allow one to derive the conclusion without the use of modus ponens, so this symbolic rendering is not entirely equivalent.  --Lambiam 08:00, 24 January 2023 (UTC)[reply]
I appreciate your continued help, Lambiam. In my second bullet I intended   to mean logical equivalence, not material. In my third bullet, I was confused, but I think I understand the distinction now. Stating " " is equivalent to simply saying that modus ponens is a rule of the calculus, without saying whether it is valid, right? -Amcbride (talk) 17:09, 24 January 2023 (UTC)[reply]
That is correct, with the proviso that the calculus might offer some other path for deriving   from   and   so to be very precise this statement is equivalent to saying that the theorems of the calculus, if it does not already have modus ponens as a rule, will not be affected by adding it as a rule.  --Lambiam 18:54, 24 January 2023 (UTC)[reply]
That makes sense. Thanks again. -Amcbride (talk) 19:54, 24 January 2023 (UTC)[reply]
For an alternative rule to modus ponens, see modus tollens. See also the article on sequents, which are used in sequent calculus as formal formulas, not as metalanguage statements.  --Lambiam 20:17, 24 January 2023 (UTC)[reply]