mersenneforum.org Prime 'anagrams'
 Register FAQ Search Today's Posts Mark Forums Read

 2022-11-12, 00:48 #1 raresaturn     Jul 2021 2·19 Posts Prime 'anagrams' Take a prime number and rearrange the digits to get another prime number. This is difficult for small numbers, but gets easier as the primes get larger. Therefore the question becomes: What is that largest prime that has no anagrams? ie. no other primes can be made by reordering it's digits. It might seem trivial for a number like 22222222222222221 to make the last digit even, but is such a number prime in the first place? (I haven't checked this example LOL) I wrote a little Python script to check these, so far the largest I've found with zero anagrams is 33343 (it's a slow program ) Can anyone find larger ones?
 2022-11-12, 02:17 #2 axn     Jun 2003 2×2,719 Posts 99949999 appears to be the largest 8-digit one
2022-11-12, 02:27   #3
raresaturn

Jul 2021

2·19 Posts

Quote:
 Originally Posted by axn 99949999 appears to be the largest 8-digit one
Cool, how did you find that one?

 2022-11-12, 02:30 #4 axn     Jun 2003 2×2,719 Posts List of near-repdigit primes/PRPs (https://stdkmd.net/nrr/prime/primesize.txt) might be a good place to look
2022-11-12, 02:35   #5
axn

Jun 2003

543810 Posts

Quote:
 Originally Posted by raresaturn Cool, how did you find that one?
Not by looking at all the anagrams for a prime, for sure

I looped thru all primes < 10^8, converted them into a "canonical" form and checked if that has been seen before. Any canonical form seen only once means, it has no anagrams. Of course, you get to know that only after entire range of n-digit primes have been scanned.

2022-11-12, 03:01   #6
raresaturn

Jul 2021

1001102 Posts

Quote:
 Originally Posted by axn Not by looking at all the anagrams for a prime, for sure
I de-duped my lists, so having all the same digits doesn't really count (or at least not in the spirit of the task )
EDIT: i think i responded the the wrong msg, no matter

Last fiddled with by raresaturn on 2022-11-12 at 03:02

 2022-11-12, 04:17 #7 ATH Einyen     Dec 2003 Denmark 19·181 Posts As you pointed out any prime with all even numbers or 5's and just the last digit 1,3,7 or 9 are trivial candidates for this. Non-trivial ones: Largest below 106: 999499 Largest below 107: 9999991 Largest below 108: 99949999 Largest below 109: 999499999 There are "only" 350 of them from 11 to 109 including the trivial ones. Count of them including trivials starting from 11: 101 - 102: 13 102 - 103: 34 103 - 104: 45 104 - 105: 68 105 - 106: 67 106 - 107: 47 107 - 108: 36 108 - 109: 40
2022-11-12, 05:22   #8
raresaturn

Jul 2021

1001102 Posts

Quote:
 Originally Posted by ATH As you pointed out any prime with all even numbers or 5's and just the last digit 1,3,7 or 9 are trivial candidates for this. Non-trivial ones: Largest below 106: 999499 Largest below 107: 9999991 Largest below 108: 99949999 Largest below 109: 999499999
That's really interesting...I wonder if we can just keep adding 9's to the end eg: 99949999999999999999999999999 (and will it always be a prime?)

Last fiddled with by raresaturn on 2022-11-12 at 05:27

 2022-11-12, 10:09 #9 LaurV Romulan Interpreter     "name field" Jun 2011 Thailand 3×23×149 Posts Nope.
2022-11-12, 11:41   #10
kriesel

"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

34·7·13 Posts

Quote:
 Originally Posted by raresaturn It might seem trivial for a number like 22222222222222221 to make the last digit even, but is such a number prime in the first place? (I haven't checked this example LOL)
22222 222222 222221 = 3 × 23 × 211 × 239851 × 6 363769 per https://www.alpertron.com.ar/ECM.HTM
Trimming away a 2 at a time, I didn't encounter a prime until 2221.

 2022-11-12, 13:29 #11 science_man_88     "Forget I exist" Jul 2009 Dartmouth NS 2×3×23×61 Posts Code: forperm(digits(randomprime(10^9)),x,print(x))

 Similar Threads Thread Thread Starter Forum Replies Last Post robert44444uk Math 27 2021-11-21 11:00 Hugo1177 Miscellaneous Math 5 2021-02-11 07:40 Hugo1177 Miscellaneous Math 1 2021-01-05 08:09 storm5510 Puzzles 61 2009-11-20 04:53 Batalov Lounge 16 2008-06-16 23:52

All times are UTC. The time now is 15:58.

Mon Feb 6 15:58:40 UTC 2023 up 172 days, 13:27, 1 user, load averages: 0.81, 0.88, 0.90

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔