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


 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:
Remember me:
Sign up! | Forgot password

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

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information