All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Pandoprime (Posted on 2012-09-01) Difficulty: 2 of 5
What is the largest existing n-digit pandigital (i.e.using all digits from 1 to n) prime number ?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 2 of 2 |

  100   for N=2 to 9
  120    V$=left("123456789",N):H$=V$
  200    Max=0
  215    repeat
  220     gosub *Permute(&V$)
  230     P=val(V$)
  240     if prmdiv(P)=P then if P>Max then Max=P
  250    until V$=H$
  260    if Max>0 then print Max
  300   next N
  800   end

finds

 4231
 7652413
 
 So only n=4 and n=7 work and these are the only two solutions.
 
 Of course if "largest" means the "largest for all values of n", rather than "for each value of n", then of course 7,652,413 is it.


  Posted by Charlie on 2012-09-01 13:35:26
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information