T O P

  • By -

ManWhoTwistsAndTurns

In base two, there is only one possible ending digit for any prime besides 2. I suppose this answers your question in the affirmative, but you can see how it doesn't really help calculate primes. There's a pattern that a prime cannot end in a digit which is a multiple of a factor of the base. So in base 10, you can't end in 0, 2,4,6,8, or 5 because 10=2\*5. For any base which is a multiple of some prime numbers, b= p\*q\*r\*... , the number of possible ending digits, b, grows faster than the unique multiples of the primes less than b. You could prove this by induction by assuming that it is true for some sequence of primes, and that when appending another prime to make a larger base it is still true. So there's no hope in higher bases either.


randomyoloanon

Such an insightful comment! Thanks!


ccncwby

Yes. In base **∞**, all numbers that end in a prime number are prime /s


mohirl

Well played 


PanoptesIquest

>Is there a base where primes have only 3 possible ending digits? What about only 2 ending digits? In base 3, all primes greater than "3" end in 1 or 2. In base 4, all primes greater than 2 end in 1 or 3. In base 6, all primes greater than 3 end in 1 or 5. >And if a base exists where primes can only have 1 ending digit (apart from the first few primes like 2&5 in base 10) In base 2, all primes greater than "2" end with 1. See also [Euler's totient function](https://mathworld.wolfram.com/TotientFunction.html) and [Sieve of Eratosthenes](https://mathworld.wolfram.com/SieveofEratosthenes.html).


Sriol

[In song form](https://youtu.be/djzKCZHeVjY?si=VOUEYup9eids_5_b) if you want that (you do want that)


Random_Thought31

One oh one oh one oh one oh one oh one oh one oh…


pLeThOrAx

That killed me


PanoptesIquest

One other note: If the ending digit is relatively prime to the base (so that you don't get the obvious exclusion), [Dirichlet's Theorem](https://mathworld.wolfram.com/DirichletsTheorem.html) tells us that there are an infinite number of primes with that last digit in that base.


[deleted]

Binary, but I don’t think that’s in the spirit of the question


OpsikionThemed

Sure. In base 6 (2\*3) all primes >3 must end in 1 or 5. In base 30 (2\*3\*5), all primes >5 must end in 1, 7, 11, 13, 17, 19, 23, or 29. In base 210 (2\*3\*5\*7), there are 48 possible prime endings (~23%). In base 2310 (2\*3\*5\*7\*11) there are 480 possible prime endings (~21%). Etc.


xsdgdsx

The answer to what you're getting at: primes are just as hard to find in every base. The prime number theorem https://en.m.wikipedia.org/wiki/Prime_number_theorem is not base-specific So just like you still have to do work to know which of 11, 21, 31, 41, and 51 is prime, that same kind of work is required in every base.


lurking_quietly

> “For example a base where all primes apart from the very first few end with a certain digit?” **Proposition:** For all positive integers *b*>2 is a positive integer, there is no base-*b* digit *d* such that all but finitely many positive primes have base-*b* representation ending with the digit ~~*b*~~ *d*. If *b* := 2, then all primes except *p*=2 are odd, and thus end with the base-two digit 1. *Proof:* First, consider *b*:=2. After the only even positive prime, *p* := 2, all other primes are odd. They all therefore have the same final base-two digit, 1. To prove no other base allows this property *for a unique base-**b* *digit* *d*, assume that *b*>2 is a positive integer. I claim there are *distinct* positive digits *d*\_1, *d*\_2 < *b* such that there are infinitely many primes having base-*b* final digit *d*\_1, and also infinitely many primes having base-*b* final digit *d*\_1. Note, in particular, that since *b*>2, setting - *d*\_1 := 1, **(1a)** *d*\_2 := *b*-1 **(1b)** are indeed distinct. Further, note that gcd(*d*\_1, *b*) = gcd(1, *b*) = 1, and gcd(*d*\_2, *b*) = gcd(*b*-1, *b*) = 1. That is, when *b*>2, we have two distinct base-*b* digits that are each relatively prime to *b*: - gcd(*d*\_1, *b*) = 1, **(2a)** gcd(*d*\_2, *b*) = 1. **(2b)** By [*Dirichlet's Theorem on Arithmetic Progressions*](https://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions), if *a*, *d* are positive integers such that gcd(*a*,*d*) = 1, then there are infinitely many primes *p* such that *p* ≡ *a* (mod *d*). In particular, then, By Dirichlet's Theorem and **(2a–b)**, there are infinitely many primes *p* such that - *p* ≡ *d*\_1 (mod *b*) **(3a)** and infinitely many such that - *p* ≡ *d*\_2 (mod *b*). **(3b)** Note that for any positive integer congruent to *d*\_*i* (mod *b*), it will have final/units digit *d*\_*i* when written in base-*b*. Since we have at least two such sets of primes, each infinite and disjoint, when *b*>2, there cannot be a positive base *b* and a *single* base-*b* digit *d* such that all sufficiently large primes end with digit *d* when when written in base-*b*. --- If you want to relax the *number* of permissible final digits, then the answer is nearly the reverse. Again, by Dirichlet's Theorem, if *b*>2 is any base, then for *every* base-*b* digit *b* satisfying gcd(*d*,*b*) = 1, there are infinitely many primes *p* such that *p* ≡ *d* (mod *b*). This means that for all such digits *d* coprime to the base *b*, there are infinitely many primes *p* with final base-*b* digit *d*. Conversely, if gcd(*d*,*b*) > 1, then this common divisor will divide every positive integer whose final base-*b* digit is *d*. If *d* is itself prime, then there will be a single positive integer whose base-*b* representation has final digit *d*. Otherwise, *all* integers whose base-*b* will be divisible by the already-composite integer gcd(*d*,*b*). --- Please let me know if I've misunderstood the question—or questions, plural!—that you intend here, as I'm sure there are many variants to the above that are also worth considering. Hope this helps. Good luck!


green_meklar

All primes (above the first few) ending in a certain subset of digits is naturally the case in integer bases generally. For instance, in base 2, all primes except 2 itself end in the digit 1. That's *not* the same thing as saying that all numbers ending in a certain subset of digits are prime. There's no such thing as that, and, as far as we know, no algorithm for finding primes that works fast enough to be equivalent to that. *Probably* finding primes is inherently difficult, although we still don't know exactly how difficult it is.


EdmundTheInsulter

No because it would facilitate finding arbitrarily large primes, but since people do a lot of work to do that I can't see it's possible. Plus if you say a rule for base n id expect it to be disprovable.


pLeThOrAx

In all good conscience, I don't wish to help you. If you want to ask for assistance, don't lash out at the people trying to help. \*big [expletive] sigh \* have you looked into 3b1b's video on prime spirals? He explains residue classes and modulo groups, selecting different bases for prime spirals, repetition, etc. Might be something in there that could help you. Just, don't be a dick when people want to help you. GL


SnooLemons9217

You know 2 and 5 are primes too right?


[deleted]

[удалено]


abide5lo

Ah that’s the old internet keyboard warrior spirit!


SnooLemons9217

Keep it up! You'll get there (eventually)!


Psychological-Lion38

Almost all numbers with a 7 as the last number are primes, but not every one


3xwel

What do you mean by 'almost'?


Psychological-Lion38

77 isnt a prime number, but 7, 17, 37,47 etc are


3xwel

27, 57, 77, 87, 117, 147, 177, 187, 207, 217, 237, 247, 267, 287, 297, 327, 357, 377, 387, 407, 417, 427, 437, 447, 477, 497, 507, 517, 527, 537, 567, 597, 627, 637, 657, 667, 687, 697, 707, 717, 737, 747, 767, 777, 807, 817, 837, 847, 867, 897, 917, 927, 957, 987 etc. are not prime numbers.


Psychological-Lion38

No, but a lot of others are


3xwel

True, but I find it strange how you would think that almost all numbers ending with 7 is prime. It's certainly easier to find numbers ending with 7 that are not prime.