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

Home > Numbers
Permuting Primes Arithmetically (Posted on 2009-01-30) Difficulty: 2 of 5
Determine all possible triplet(s) (A, B, C) of four-digit decimal primes, with A < B < C, such that:

(i) A, B and C (in this order) are in arithmetic sequence, and:

(ii) Each of B and C is obtained by permuting the digits of A, and:

(iii) None of A, B and C can contain any leading zero.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer exploration (spoiler?) | Comment 1 of 4

   10   while N<10000
   20     N=nxtprm(N)
   30     Ct=Ct+1
   40     if N>1000 and Flag=0 then First=Ct:Flag=1
   50     if N<10000 then Last=Ct
   90   wend
  100   print First,Last
  105   Ct=0
  110   for I=First to Last-2
  120   for J=I+1 to Last-1
  130     Trial=prm(I)+2*(prm(J)-prm(I))
  140     if Trial>prm(Last) then cancel for:goto 190
  150     if prmdiv(Trial)=Trial then gosub *TestEm
  160   next
  190   next
  200   print Ct
  205   close
  210   end
 
  500   *TestEm
  510    A=cutspc(str(prm(I))):B=cutspc(str(prm(J))):C=cutspc(str(Trial))
  610    H=A
  620    Good=1
  630    for K=1 to len(A)
  640      Ix=instr(H,mid(B,K,1)):if Ix=0 then Good=0:cancel for:goto 799
  650      H=left(H,Ix-1)+mid(H,Ix+1)
  655    next
  660    H=C
  670    for K=1 to len(C)
  680      Ix=instr(H,mid(B,K,1)):if Ix=0 then Good=0:cancel for:goto 799
  690      H=left(H,Ix-1)+mid(H,Ix+1)
  695    next
  700    print A,B,C
  799   return
 
fails to find any such triplet. It finds 42983 triplets, none of which are triple anagrams.

 

Modifications find instances where the first two of an arithmetic-progression-prime triplet are anagrams, and others where the second and third are anagrams, but none of the triplets are on both lists.  So I don't think triplets exist satisfying the criteria.

The lists (only a pair of anagrams per triplet):


second and third are anagrams:

1087    5119    9151
1103    4073    7043
1171    3457    5743
1201    5179    9157
1237    5197    9157
1277    3257    5237
1301    5279    9257
1303    4273    7243
1427    5189    8951
1493    4517    7541
1549    2539    3529
1657    2593    3529
1709    4679    7649
1889    3851    5813
1901    4871    7841
1901    5879    9857
1949    2939    3929
1979    2753    3527
2069    3041    4013
2377    2953    3529
2383    4363    6343
2843    5147    7451
2953    3943    4933
2957    3947    4937
2971    4357    5743
3011    5981    8951
3167    4157    5147
3191    5171    7151
3221    5237    7253
3491    5471    7451
3499    5479    7459
3761    4751    5741
3769    4759    5749
4409    6389    8369
4801    6781    8761
4831    6397    7963
4877    5867    6857
5003    6983    8963
5231    7229    9227
5261    7349    9437
5431    7699    9967
5449    7393    9337
5501    7499    9497
5519    7499    9479
5581    6571    7561
5591    7589    9587
5701    7699    9697
5801    7529    9257
6329    7283    8237
6577    8179    9781
6581    7589    8597
7607    8597    9587


first two are anagrams:

1013    3011    5009
1021    2011    3001
1033    3301    5569
1039    3019    4999
1051    5011    8971
1063    3061    5059
1103    3011    4919
1123    2311    3499
1153    3511    5869
1237    3217    5197
1283    3821    6359
1321    2311    3301
1327    2713    4099
1423    2341    3259
1427    2417    3407
1433    3413    5393
1523    2531    3539
1549    4519    7489
1549    4951    8353
1627    2617    3607
1693    3691    5689
1721    2711    3701
1723    2371    3019
1723    2731    3739
1733    3371    5009
1753    3517    5281
1823    2381    2939
1973    3917    5861
2053    5023    7993
2113    3121    4129
2131    3121    4111
2539    3529    4519
2741    4721    6701
2749    4729    6709
2833    3823    4813
2939    3929    4919
2953    5923    8893
3067    6037    9007
3163    6133    9103
3251    5231    7211
3253    5233    7213
3457    5437    7417
3467    6473    9479
3659    5693    7727
3769    6793    9817
3863    6833    9803
3943    4933    5923
3947    4793    5639
3947    4937    5927
3967    6793    9619
4357    5347    6337
4357    5743    7129
4567    6547    8527
4657    5647    6637
4861    6841    8821
4969    6949    8929
5471    7451    9431
5477    7457    9437
5479    7459    9439
6079    7069    8059
6379    7963    9547
7583    8537    9491

  Posted by Charlie on 2009-01-30 14:35:55
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 (14)
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