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

Home > Numbers
From primes to palindrome (Posted on 2012-03-24) Difficulty: 2 of 5
The product of the first X primes divided by Y results in a non-trivial (more than a single digit) palindrome number.
Find a solution(or solutions?) for integers X and Y.

See The Solution Submitted by Ady TZIDON    
Rating: 5.0000 (3 votes)

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

The first two numbers on each line below are the X and Y values. The next two numbers are Y and the produced palindrome, whichever is smaller coming first. In the case of (7, 595) it could just as easily been (7,858) as the Y value is also a palindrome; there may be other such situations on the list--I didn't check thoroughly). The final two numbers are the Xth prime itself and the product to that point.

 5  210   11  210   11  2310
 5  105   22  105   11  2310
 5  30   30  77   11  2310
 5  70   33  70   11  2310
 5  35   35  66   11  2310
 5  42   42  55   11  2310
 6  5   5  6006   13  30030
 6  6   6  5005   13  30030
 6  10   10  3003   13  30030
 6  2730   11  2730   13  30030
 6  15   15  2002   13  30030
 6  1365   22  1365   13  30030
 6  30   30  1001   13  30030
 6  910   33  910   13  30030
 6  35   35  858   13  30030
 6  546   55  546   13  30030
 6  455   66  455   13  30030
 6  390   77  390   13  30030
 7  46410   11  46410   17  510510
 7  23205   22  23205   17  510510
 7  15470   33  15470   17  510510
 7  9282   55  9282   17  510510
 7  7735   66  7735   17  510510
 7  6630   77  6630   17  510510
 7  85   85  6006   17  510510
 7  102   102  5005   17  510510
 7  170   170  3003   17  510510
 7  255   255  2002   17  510510
 7  510   510  1001   17  510510
 7  595   595  858   17  510510
 8  10   10  969969   19  9699690
 8  881790   11  881790   19  9699690
 8  15   15  646646   19  9699690
 8  440895   22  440895   19  9699690
 8  30   30  323323   19  9699690
 8  293930   33  293930   19  9699690
 8  176358   55  176358   19  9699690
 8  146965   66  146965   19  9699690
 8  125970   77  125970   19  9699690
 8  30030   323  30030   19  9699690
 8  19635   494  19635   19  9699690
 8  16302   595  16302   19  9699690
 8  15015   646  15015   19  9699690
 8  11305   858  11305   19  9699690
 8  10010   969  10010   19  9699690
 8  9690   1001  9690   19  9699690
 8  1105   1105  8778   19  9699690
 8  1615   1615  6006   19  9699690
 8  1938   1938  5005   19  9699690
 8  4845   2002  4845   19  9699690
 8  2730   2730  3553   19  9699690
 8  3230   3003  3230   19  9699690
 9  20281170   11  20281170   23  223092870
 9  10140585   22  10140585   23  223092870
 9  6760390   33  6760390   23  223092870
 9  4056234   55  4056234   23  223092870
 9  3380195   66  3380195   23  223092870
 9  2897310   77  2897310   23  223092870
 9  1385670   161  1385670   23  223092870
 9  230   230  969969   23  223092870
 9  690690   323  690690   23  223092870
 9  345   345  646646   23  223092870
 9  451605   494  451605   23  223092870
 9  374946   595  374946   23  223092870
 9  345345   646  345345   23  223092870
 9  690   690  323323   23  223092870
 9  260015   858  260015   23  223092870
 9  230230   969  230230   23  223092870
 9  222870   1001  222870   23  223092870
 9  125970   1771  125970   23  223092870
 9  111435   2002  111435   23  223092870
 9  74290   3003  74290   23  223092870
 9  62790   3553  62790   23  223092870
 9  44574   5005  44574   23  223092870
 9  37145   6006  37145   23  223092870
 9  25415   8778  25415   23  223092870
 10  588153930   11  588153930   29  6469693230
 10  294076965   22  294076965   29  6469693230
 10  196051310   33  196051310   29  6469693230
 10  117630786   55  117630786   29  6469693230
 10  98025655   66  98025655   29  6469693230
 10  84021990   77  84021990   29  6469693230
 10  40184430   161  40184430   29  6469693230
 10  20030010   323  20030010   29  6469693230
 10  13096545   494  13096545   29  6469693230
 10  10873434   595  10873434   29  6469693230
 10  10015005   646  10015005   29  6469693230
 10  7540435   858  7540435   29  6469693230
 10  6676670   969  6676670   29  6469693230
 10  6463230   1001  6463230   29  6469693230
 10  3653130   1771  3653130   29  6469693230
 10  3231615   2002  3231615   29  6469693230
 10  2154410   3003  2154410   29  6469693230
 10  1820910   3553  1820910   29  6469693230
 10  1292646   5005  1292646   29  6469693230
 10  1077205   6006  1077205   29  6469693230
 10  6670   6670  969969   29  6469693230
 10  881790   7337  881790   29  6469693230
 10  737035   8778  737035   29  6469693230
 10  10005   10005  646646   29  6469693230
 10  20010   20010  323323   29  6469693230
 11  18232771830   11  18232771830   31  200560490130
 11  9116385915   22  9116385915   31  200560490130
 11  6077590610   33  6077590610   31  200560490130
 11  3646554366   55  3646554366   31  200560490130
 11  3038795305   66  3038795305   31  200560490130
 11  2604681690   77  2604681690   31  200560490130
 11  1245717330   161  1245717330   31  200560490130
 11  620930310   323  620930310   31  200560490130
 11  462120945   434  462120945   31  200560490130
 11  405992895   494  405992895   31  200560490130
 11  337076454   595  337076454   31  200560490130
 11  310465155   646  310465155   31  200560490130
 11  233753485   858  233753485   31  200560490130
 11  206976770   969  206976770   31  200560490130
 11  200360130   1001  200360130   31  200560490130
 11  113247030   1771  113247030   31  200560490130
 11  100180065   2002  100180065   31  200560490130
 11  66786710   3003  66786710   31  200560490130
 11  56448210   3553  56448210   31  200560490130
 11  42010995   4774  42010995   31  200560490130
 11  40072026   5005  40072026   31  200560490130
 11  39210262   5115  39210262   31  200560490130
 11  5510   5510  36399363   31  200560490130
 11  33393355   6006  33393355   31  200560490130
 11  27335490   7337  27335490   31  200560490130
 11  8265   8265  24266242   31  200560490130
 11  22848085   8778  22848085   31  200560490130
 11  20281170   9889  20281170   31  200560490130
 11  16546530   12121  16546530   31  200560490130
 11  16530   16530  12133121   31  200560490130
 11  8273265   24242  8273265   31  200560490130
 11  5515510   36363  5515510   31  200560490130
 11  60610   60610  3309033   31  200560490130
 11  90915   90915  2206022   31  200560490130
 11  1504230   133331  1504230   31  200560490130
 11  181830   181830  1103011   31  200560490130
 11  206770   206770  969969   31  200560490130
 11  752115   266662  752115   31  200560490130
 11  310155   310155  646646   31  200560490130
 11  620310   323323  620310   31  200560490130
 11  501410   399993  501410   31  200560490130
 12  674612557710   11  674612557710   37  7420738134810
 12  337306278855   22  337306278855   37  7420738134810
 12  224870852570   33  224870852570   37  7420738134810
 12  134922511542   55  134922511542   37  7420738134810
 12  112435426285   66  112435426285   37  7420738134810
 12  96373222530   77  96373222530   37  7420738134810
 12  66853496710   111  66853496710   37  7420738134810
 12  46091541210   161  46091541210   37  7420738134810
 12  33426748355   222  33426748355   37  7420738134810
 12  22974421470   323  22974421470   37  7420738134810
 12  17098474965   434  17098474965   37  7420738134810
 12  15021737115   494  15021737115   37  7420738134810
 12  13370699342   555  13370699342   37  7420738134810
 12  12471828798   595  12471828798   37  7420738134810
 12  11487210735   646  11487210735   37  7420738134810
 12  9550499530   777  9550499530   37  7420738134810
 12  8648878945   858  8648878945   37  7420738134810
 12  7658140490   969  7658140490   37  7420738134810
 12  7413324810   1001  7413324810   37  7420738134810
 12  6077590610   1221  6077590610   37  7420738134810
 12  4190140110   1771  4190140110   37  7420738134810
 12  3706662405   2002  3706662405   37  7420738134810
 12  3038795305   2442  3038795305   37  7420738134810
 12  2471108270   3003  2471108270   37  7420738134810
 12  2088583770   3553  2088583770   37  7420738134810
 12  1554406815   4774  1554406815   37  7420738134810
 12  1482664962   5005  1482664962   37  7420738134810
 12  1450779694   5115  1450779694   37  7420738134810
 12  5510   5510  1346776431   37  7420738134810
 12  1235554135   6006  1235554135   37  7420738134810
 12  1011413130   7337  1011413130   37  7420738134810
 12  845379145   8778  845379145   37  7420738134810
 12  750403290   9889  750403290   37  7420738134810
 12  734653810   10101  734653810   37  7420738134810
 12  612221610   12121  612221610   37  7420738134810
 12  415239110   17871  415239110   37  7420738134810
 12  367326905   20202  367326905   37  7420738134810
 12  306110805   24242  306110805   37  7420738134810
 12  30305   30305  244868442   37  7420738134810
 12  206976770   35853  206976770   37  7420738134810
 12  204073870   36363  204073870   37  7420738134810
 12  178752665   41514  178752665   37  7420738134810
 12  146930762   50505  146930762   37  7420738134810
 12  60610   60610  122434221   37  7420738134810
 12  66786710   111111  66786710   37  7420738134810
 12  55656510   133331  55656510   37  7420738134810
 12  203870   203870  36399363   37  7420738134810
 12  206770   206770  35888853   37  7420738134810
 12  33393355   222222  33393355   37  7420738134810
 12  27828255   266662  27828255   37  7420738134810
 12  305805   305805  24266242   37  7420738134810
 12  22951470   323323  22951470   37  7420738134810
 12  18552170   399993  18552170   37  7420738134810
 12  501410   501410  14799741   37  7420738134810
 12  13357342   555555  13357342   37  7420738134810
 12  611610   611610  12133121   37  7420738134810
 12  11475735   646646  11475735   37  7420738134810
 12  7650490   969969  7650490   37  7420738134810
 12  6727710   1103011  6727710   37  7420738134810
 12  5515510   1345431  5515510   37  7420738134810
 12  3363855   2206022  3363855   37  7420738134810
 12  2242570   2242570  3309033   37  7420738134810
 12  2274470   2274470  3262623   37  7420738134810
 13  27659114866110   11  27659114866110   41  304250263527210
 13  13829557433055   22  13829557433055   41  304250263527210
 13  9219704955370   33  9219704955370   41  304250263527210
 13  5531822973222   55  5531822973222   41  304250263527210
 13  4609852477685   66  4609852477685   41  304250263527210
 13  3951302123730   77  3951302123730   41  304250263527210
 13  2740993365110   111  2740993365110   41  304250263527210
 13  1889753189610   161  1889753189610   41  304250263527210
 13  1370496682555   222  1370496682555   41  304250263527210
 13  941951280270   323  941951280270   41  304250263527210
 13  701037473565   434  701037473565   41  304250263527210
 13  615891221715   494  615891221715   41  304250263527210
 13  548198673022   555  548198673022   41  304250263527210
 13  511344980718   595  511344980718   41  304250263527210
 13  470975640135   646  470975640135   41  304250263527210
 13  391570480730   777  391570480730   41  304250263527210
 13  354604036745   858  354604036745   41  304250263527210
 13  313983760090   969  313983760090   41  304250263527210
 13  303946317210   1001  303946317210   41  304250263527210
 13  249181215010   1221  249181215010   41  304250263527210
 13  171795744510   1771  171795744510   41  304250263527210
 13  151973158605   2002  151973158605   41  304250263527210
 13  124590607505   2442  124590607505   41  304250263527210
 13  101315439070   3003  101315439070   41  304250263527210
 13  85631934570   3553  85631934570   41  304250263527210
 13  63730679415   4774  63730679415   41  304250263527210
 13  60789263442   5005  60789263442   41  304250263527210
 13  59481967454   5115  59481967454   41  304250263527210
 13  50657719535   6006  50657719535   41  304250263527210
 13  41467938330   7337  41467938330   41  304250263527210
 13  39683091630   7667  39683091630   41  304250263527210
 13  34660544945   8778  34660544945   41  304250263527210
 13  30766534890   9889  30766534890   41  304250263527210
 13  30120806210   10101  30120806210   41  304250263527210
 13  25101086010   12121  25101086010   41  304250263527210
 13  17024803510   17871  17024803510   41  304250263527210
 13  15060403105   20202  15060403105   41  304250263527210
 13  12550543005   24242  12550543005   41  304250263527210
 13  8486047570   35853  8486047570   41  304250263527210
 13  8367028670   36363  8367028670   41  304250263527210
 13  7328859265   41514  7328859265   41  304250263527210
 13  6024161242   50505  6024161242   41  304250263527210
 13  2738255110   111111  2738255110   41  304250263527210
 13  2281916910   133331  2281916910   41  304250263527210
 13  1369127555   222222  1369127555   41  304250263527210
 13  225910   225910  1346776431   41  304250263527210
 13  1140958455   266662  1140958455   41  304250263527210
 13  941010270   323323  941010270   41  304250263527210
 13  760638970   399993  760638970   41  304250263527210
 13  547651022   555555  547651022   41  304250263527210
 13  470505135   646646  470505135   41  304250263527210
 13  319873190   951159  319873190   41  304250263527210
 13  313670090   969969  313670090   41  304250263527210
 13  275836110   1103011  275836110   41  304250263527210
 13  1242505   1242505  244868442   41  304250263527210
 13  226135910   1345431  226135910   41  304250263527210
 13  137918055   2206022  137918055   41  304250263527210
 13  2485010   2485010  122434221   41  304250263527210
 13  93253270   3262623  93253270   41  304250263527210
 13  91945370   3309033  91945370   41  304250263527210
 13  8358670   8358670  36399363   41  304250263527210
 13  36390795   8360638  36390795   41  304250263527210
 13  8477570   8477570  35888853   41  304250263527210
 13  25076010   12133121  25076010   41  304250263527210
 13  12538005   12538005  24266242   41  304250263527210
 13  20557810   14799741  20557810   41  304250263527210
 14  1189341939242730   11  1189341939242730   43  13082761331670030
 14  594670969621365   22  594670969621365   43  13082761331670030
 14  396447313080910   33  396447313080910   43  13082761331670030
 14  237868387848546   55  237868387848546   43  13082761331670030
 14  198223656540455   66  198223656540455   43  13082761331670030
 14  169905991320390   77  169905991320390   43  13082761331670030
 14  117862714699730   111  117862714699730   43  13082761331670030
 14  81259387153230   161  81259387153230   43  13082761331670030
 14  58931357349865   222  58931357349865   43  13082761331670030
 14  40503905051610   323  40503905051610   43  13082761331670030
 14  30144611363295   434  30144611363295   43  13082761331670030
 14  26483322533745   494  26483322533745   43  13082761331670030
 14  23572542939946   555  23572542939946   43  13082761331670030
 14  21987834170874   595  21987834170874   43  13082761331670030
 14  20251952525805   646  20251952525805   43  13082761331670030
 14  16837530671390   777  16837530671390   43  13082761331670030
 14  15247973580035   858  15247973580035   43  13082761331670030
 14  13501301683870   969  13501301683870   43  13082761331670030
 14  13228272327270   989  13228272327270   43  13082761331670030
 14  13069691640030   1001  13069691640030   43  13082761331670030
 14  10714792245430   1221  10714792245430   43  13082761331670030
 14  7387217013930   1771  7387217013930   43  13082761331670030
 14  6534845820015   2002  6534845820015   43  13082761331670030
 14  5357396122715   2442  5357396122715   43  13082761331670030
 14  4356563880010   3003  4356563880010   43  13082761331670030
 14  3682173186510   3553  3682173186510   43  13082761331670030
 14  2740419214845   4774  2740419214845   43  13082761331670030
 14  2613938328006   5005  2613938328006   43  13082761331670030
 14  2557724600522   5115  2557724600522   43  13082761331670030
 14  2178281940005   6006  2178281940005   43  13082761331670030
 14  1783121348190   7337  1783121348190   43  13082761331670030
 14  1706372940090   7667  1706372940090   43  13082761331670030
 14  1490403432635   8778  1490403432635   43  13082761331670030
 14  1322961000270   9889  1322961000270   43  13082761331670030
 14  1295194667030   10101  1295194667030   43  13082761331670030
 14  1079346698430   12121  1079346698430   43  13082761331670030
 14  852241634530   15351  852241634530   43  13082761331670030
 14  732066550930   17871  732066550930   43  13082761331670030
 14  647597333515   20202  647597333515   43  13082761331670030
 14  539673349215   24242  539673349215   43  13082761331670030
 14  364900045510   35853  364900045510   43  13082761331670030
 14  359782232810   36363  359782232810   43  13082761331670030
 14  315140948395   41514  315140948395   43  13082761331670030
 14  259038933406   50505  259038933406   43  13082761331670030
 14  175968920490   74347  175968920490   43  13082761331670030
 14  148704918635   87978  148704918635   43  13082761331670030
 14  117744969730   111111  117744969730   43  13082761331670030
 14  98122427130   133331  98122427130   43  13082761331670030
 14  77476512230   168861  77476512230   43  13082761331670030
 14  58872484865   222222  58872484865   43  13082761331670030
 14  49061213565   266662  49061213565   43  13082761331670030
 14  40463441610   323323  40463441610   43  13082761331670030
 14  32707475710   399993  32707475710   43  13082761331670030
 14  23548993946   555555  23548993946   43  13082761331670030
 14  20231720805   646646  20231720805   43  13082761331670030
 14  13754547170   951159  13754547170   43  13082761331670030
 14  13487813870   969969  13487813870   43  13082761331670030
 14  13215057270   989989  13215057270   43  13082761331670030
 14  11860952730   1103011  11860952730   43  13082761331670030
 14  9723844130   1345431  9723844130   43  13082761331670030
 14  5930476365   2206022  5930476365   43  13082761331670030
 14  4009890610   3262623  4009890610   43  13082761331670030
 14  3953650910   3309033  3953650910   43  13082761331670030
 14  1564804185   8360638  1564804185   43  13082761331670030
 14  9714130   9714130  1346776431   43  13082761331670030
 14  1078268430   12133121  1078268430   43  13082761331670030
 14  883985830   14799741  883985830   43  13082761331670030
 14  539134215   24266242  539134215   43  13082761331670030
 14  364535510   35888853  364535510   43  13082761331670030
 14  359422810   36399363  359422810   43  13082761331670030
 14  53427715   53427715  244868442   43  13082761331670030


    5   Prod=1
    6   kill "primepal.txt"
    7   open "primepal.txt" for output as #2
   10   while Ct<400
   20     P=nxtprm(P):PrimNo=PrimNo+1
   30     Prod=Prod*P
   40     Lim=int(sqrt(Prod)+0.5)
   50     for Divisor=1 to Lim
   60         Q=Prod//Divisor
   70         if Q=int(Q) then
   80           :Good=0:Nontriv=0
   90           :S=cutspc(str(Divisor))
  100           :Pal=1
  110           :for I=1 to int(len(S)/2)
  120             :if mid(S,I,1)<>mid(S,len(S)+1-I,1) then Pal=0:endif
  130           :next
  140           :if Pal then Good=1:Y=Q:if len(S)>1 then Nontriv=1:endif:endif
  150           :S=cutspc(str(Q))
  160           :Pal=1
  170           :for I=1 to int(len(S)/2)
  180             :if mid(S,I,1)<>mid(S,len(S)+1-I,1) then Pal=0:endif
  190           :next
  200           :if Pal then Good=1:Y=Divisor:if len(S)>1 then Nontriv=1:endif:endif
  210           :if Good then
  220              :print P,Prod,Divisor,Q;:Ct=Ct+1
  230              :if Nontriv then print "***":print PrimNo,Y:Ct=Ct+1:else print:endif
  235              :if Nontriv then print #2,PrimNo;Y,Divisor;Q,P;Prod
  240              :if Ct>35 then Tst="":while Tst="":Tst=inkey:wend:print:Ct=0
  245              :if Tst=chr(27) then end
  250     next Divisor
  260   wend


  Posted by Charlie on 2012-03-24 14:25:48
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 (6)
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