Problems & Puzzles: Puzzles

Puzzle 1202 Look & Say Squares

On Dec 12, 2024 Giorgos Kalogeropoulos wrote:

Let us call LS(n) the "look and say" transformation of n (A045918).
The first primes p with the property that LS(p) is a perfect square are:
      p                   LS(p)
  77711   ->    3721 = 61^2
  83399   ->  182329 = 427^2
  97711   ->   192721 = 439^2
 1166311 -> 21261321 = 4611^2
 6623311 -> 26122321 = 5111^2
 9211199 -> 19123129 = 4373^2

 
Q1. Can you extend this sequence?
Q2. Can you find a positive integer n such that LS(n^2) is a perfect square?
Q3. Can you find a prime number p such that LS(p^2) is a perfect square?

 


From Dec28 to Jan 4, 2025, contributions came from Michael Branicky, Gennady Gusev, Oscar Volpatti, Simon Cavegn, Emmanuel Vantieghem

***

Michael wrote:

For Q1, I found a number of solutions to extend the sequence:
    
    52222399 15421329 = 3927^2
    55999511 25391521 = 5039^2
    96633311 19263321 = 4389^2
   110999711 2110391721 = 45939^2
   430003711 141330131721 = 375939^2
   444555311 34351321 = 5861^2
   611177311 1631271321 = 40389^2
   944692799 19241619121729 = 4386527^2
   957999199 191517391129 = 437627^2
  2244865199 22241816151129 = 4716123^2
  3211111199 13126129 = 3623^2
  3991889999 1329112849 = 36457^2
  4499977711 24393721 = 4939^2
  5253773311 15121513272321 = 3888639^2
  6110161111 162110111641 = 402629^2
  7644449999 17164449 = 4143^2
  9144422711 191134221721 = 437189^2
 17777554511 114725141521 = 338711^2
 32555539799 13124513191729 = 3622777^2
 39991555711 133911351721 = 365939^2
 42222277711 14523721 = 3811^2
 43328809999 142312281049 = 377243^2
 43335449999 1433152449 = 37857^2
 44449334599 441923141529 = 664773^2
 44773333399 24275329 = 4927^2
 47774499911 1437243921 = 37911^2
 53366881111 1523262841 = 39029^2 
 55114555511 2521144521 = 50211^2
 55559992199 4539121129 = 67373^2
 56666401111 1546141041 = 39321^2
 61177777799 16216729 = 4027^2
 62914441111 161219113441 = 401521^2
 65551117711 1635312721 = 40439^2
 68777441111 1618372441 = 40229^2
 74455719911 17242517112921 = 4152411^2
 77721541111 371211151441 = 609271^2
 88853333399 38155329 = 6177^2
100000566311 115015261321 = 339139^2
100077761111 1130371641 = 33621^2
111888833311 31483321 = 5611^2
 
With respect to Q3, I searched LS(p^2) for all p <= 82800000001 and found no squares.
Indeed, there are no primes p with LS(p^2) square. The reason is that for primes with
more than one digit, they must end in 1, 3, 7, or 9, and their squares must end in
01, 09, 21, 29, 41, 49, 61, 69, 81, or 89. Hence, their last two Look and Say digits
are either 11 or 19, and neither is the possible ending for a square.

 
For Q2, I searched LS(n^2) for all n <= 5600000000 and found no squares. Using arguments as for Q3 above, one can isolate that n, n^2, and LS(n^2) must end as follows:
44 24
76 1716
36 1316

 
It may be possible to prove no such patterns cannot be "extended to the left".

***

Gennady wrote:

Q1. I have found all such numbers for LS(n)<25*10^12 (5931 numbers). See attached file Pu1202 GG.txt
The first 30 numbers are:
77711 -> 3721 = 61^2
83399 -> 182329 = 427^2
97711 -> 192721 = 439^2
1166311 -> 21261321 = 4611^2
6623311 -> 26122321 = 5111^2
9211199 -> 19123129 = 4373^2
52222399 -> 15421329 = 3927^2
55999511 -> 25391521 = 5039^2
96633311 -> 19263321 = 4389^2
110999711 -> 2110391721 = 45939^2
430003711 -> 141330131721 = 375939^2
444555311 -> 34351321 = 5861^2
611177311 -> 1631271321 = 40389^2
944692799 -> 19241619121729 = 4386527^2
957999199 -> 191517391129 = 437627^2
2244865199 -> 22241816151129 = 4716123^2
3211111199 -> 13126129 = 3623^2
3991889999 -> 1329112849 = 36457^2
4499977711 -> 24393721 = 4939^2
5253773311 -> 15121513272321 = 3888639^2
6110161111 -> 162110111641 = 402629^2
7644449999 -> 17164449 = 4143^2
9144422711 -> 191134221721 = 437189^2
17777554511 -> 114725141521 = 338711^2
32555539799 -> 13124513191729 = 3622777^2
39991555711 -> 133911351721 = 365939^2
42222277711 -> 14523721 = 3811^2
43328809999 -> 142312281049 = 377243^2
43335449999 -> 1433152449 = 37857^2
44449334599 -> 441923141529 = 664773^2
...

75555555553333333777777777333333336666666699999999 -> 17957397838689 = 4237617^2

 

Another large number (123 digits) that I've got is:
888888888999999995555333333333000000005555555222222221111110000000777777777666666667722222888888811111111555555554444449999 -> 988945938075826170978627527881856449 = 994457609994426143^2.

***

Oscar wrote:

Q1.
After the six given examples, 37 more primes p below 10^11 satisfy equation LS(p) = q^2.

 
p  LS(p)  q
52222399  15421329  3927
55999511  25391521  5039
96633311  19263321  4389
110999711  2110391721  45939
430003711  141330131721  375939
444555311  34351321  5861
611177311  1631271321  40389
944692799  19241619121729  4386527
957999199  191517391129  437627
2244865199  22241816151129  4716123
3211111199  13126129  3623
3991889999  1329112849  36457
4499977711  24393721  4939
5253773311  15121513272321  3888639
6110161111  162110111641  402629
7644449999  17164449  4143
9144422711  191134221721  437189
17777554511  114725141521  338711
32555539799  13124513191729  3622777
39991555711  133911351721  365939
42222277711  14523721  3811
43328809999  142312281049  377243
43335449999  1433152449  37857
44449334599  441923141529  664773
44773333399  24275329  4927
47774499911  1437243921  37911
53366881111  1523262841  39029
55114555511  2521144521  50211
55559992199  4539121129  67373
56666401111  1546141041  39321
61177777799  16216729  4027
62914441111  161219113441  401521
65551117711  1635312721  40439
68777441111  1618372441  40229
74455719911  17242517112921  4152411
77721541111  371211151441  609271
88853333399  38155329  6177

 
I searched for more integers q such that q^2 is the description of some prime p.
The largest proven prime I was able to detect has 141 digits:
p = 6*R(141)-5555,
LS(p) = 137|6|4|1 = 137641 = 371^2.
Notation: R(n) is the repunit with length n, c|d is the concatenation of numbers c and d.

 
Q2.
Equation LS(n^2) = q^2 has infinitely many solutions.
Consider the following construction.
Choose an integer a not ending with 0.
Compute the square b = a^2.
Compute the description c = LS(b).
If c is the square of some integer r:
assign n = a, q = r.
Otherwise:
choose an integer d such that the concatenation c|d is the square of some integer r;
assign n = a*10^(d*5), q = r*10.

 
Explanation.
For any integer c, infinitely many suitable integers d can be found.
If desired number d has k digits, then r must be between sqrt(c*10^k) and sqrt((c+1)*10^k).
For k big enough, target interval becomes larger than the unit interval, so it must contain some integer r.
In particular, it suffices to select k satisfying inequality 10^k > 4*c+2.
Let's verify that the pair (n,q) is a solution.
n = a*10^(d*5)
n^2 = a^2*10^(d*10) = b*10^(d*10)
LS(n^2) = LS(b)|d*10|0 = c|d|0|0
LS(n^2) = r^2|0|0 = r^2*100 = (r*10)^2

 
Example
Choose a=2; then b=4 and c=14, not a square.
Select d.
k=1: r=12, c|d = 144, d=4;
k=2: r=38, c|d = 1444, d=44;
k=3: r = 119 to 122; d = 161, 400, 641, or 884;
and so on.
Choice d=4 generates solution (2*10^20,120):
n = 2*10^20,
n^2 = 4*10^40,
LS(n^2) = 1|4|40|0 = 14400 = 120^2.

 

 
Q3.
Equation LS(n^2) = q^2 has no solutions with n odd.
LS(1^2) = 1|1 = 11, not a square.
LS(3^2) = 1|9 = 19, not a square.
Let n be an odd integer greater than 3, so that the square n^2 has at least two digits.
Let t and u be the "tens" digit and the "units" digit of n^2, respectively. 
If we divide n^2 by 100, the remainder 10*t+u must be one of the following 11 numbers:  
1,9,21,25,29,41,49,61,69,81,89.
In particular, u must be odd and t must be even.
Now consider the description x = LS(n^2)
As t differs from u, number x has at least four digits and ends with block t|1|u.
Therefore:
x is odd because its "units" digit is odd.
but x can't be an odd square because its "tens" digit isn't even.

 
Given a solution LS(n^2) = q^2, can n be prime? 
No, because n is neither 2 (as checked before) nor an odd integer.

***

Simone wrote:

Q1
My algorithm is missing results where the squared number is bigger than 200'000'000'000.
It's also missing results where the look and say function has more than a single digit for a count. e.g. 101 "ten ones".
But it still found 63'055'467 solutions: https://truebased.net/files/Primepuzzle1202.zip
Here a few of them:

77711 => LS(p): 3721=61^2
83399 => LS(p): 182329=427^2
97711 => LS(p): 192721=439^2
1166311 => LS(p): 21261321=4611^2
6623311 => LS(p): 26122321=5111^2
9211199 => LS(p): 19123129=4373^2
52222399 => LS(p): 15421329=3927^2
55999511 => LS(p): 25391521=5039^2
96633311 => LS(p): 19263321=4389^2
110999711 => LS(p): 2110391721=45939^2
430003711 => LS(p): 141330131721=375939^2
444555311 => LS(p): 34351321=5861^2
611177311 => LS(p): 1631271321=40389^2
944692799 => LS(p): 19241619121729=4386527^2
957999199 => LS(p): 191517391129=437627^2
2244865199 => LS(p): 22241816151129=4716123^2
3211111199 => LS(p): 13126129=3623^2
3991889999 => LS(p): 1329112849=36457^2
4499977711 => LS(p): 24393721=4939^2
5253773311 => LS(p): 15121513272321=3888639^2
6110161111 => LS(p): 162110111641=402629^2
7644449999 => LS(p): 17164449=4143^2
9144422711 => LS(p): 191134221721=437189^2
17777554511 => LS(p): 114725141521=338711^2
32555539799 => LS(p): 13124513191729=3622777^2
39991555711 => LS(p): 133911351721=365939^2
42222277711 => LS(p): 14523721=3811^2
43328809999 => LS(p): 142312281049=377243^2
43335449999 => LS(p): 1433152449=37857^2
44449334599 => LS(p): 441923141529=664773^2
44773333399 => LS(p): 24275329=4927^2
47774499911 => LS(p): 1437243921=37911^2
53366881111 => LS(p): 1523262841=39029^2
55114555511 => LS(p): 2521144521=50211^2
55559992199 => LS(p): 4539121129=67373^2
56666401111 => LS(p): 1546141041=39321^2
61177777799 => LS(p): 16216729=4027^2
62914441111 => LS(p): 161219113441=401521^2
65551117711 => LS(p): 1635312721=40439^2
68777441111 => LS(p): 1618372441=40229^2
74455719911 => LS(p): 17242517112921=4152411^2
77721541111 => LS(p): 371211151441=609271^2
88853333399 => LS(p): 38155329=6177^2
100000566311 => LS(p): 115015261321=339139^2
100077761111 => LS(p): 1130371641=33621^2
111888833311 => LS(p): 31483321=5611^2
144002799911 => LS(p): 11242012173921=3352911^2
222244409999 => LS(p): 42341049=6507^2
244448555599 => LS(p): 1244184529=35273^2
255555297799 => LS(p): 125512192729=354277^2
255558881111 => LS(p): 12453841=3529^2
293000099911 => LS(p): 121913403921=349161^2
311988844399 => LS(p): 13211938241329=3634823^2
522221141111 => LS(p): 1542211441=39271^2
555987755599 => LS(p): 351918273529=593227^2
666222777799 => LS(p): 36324729=6027^2
666336133399 => LS(p): 362316113329=601927^2
666551699911 => LS(p): 362511163921=602089^2
749994541111 => LS(p): 17143914151441=4140521^2
765533337799 => LS(p): 171625432729=414277^2
777770009999 => LS(p): 573049=757^2
811555955599 => LS(p): 182135193529=426773^2
822011133311 => LS(p): 182210313321=426861^2
833455785599 => LS(p): 1823142517182529=42698273^2
855555101111 => LS(p): 1855111041=43071^2
867404034199 => LS(p): 1816171410141013141129=42616562627^2
988883307199 => LS(p): 19482310171129=4413877^2
1114411111111 => LS(p): 312481=559^2
1119900988399 => LS(p): 31292019281329=5593927^2
1277799999599 => LS(p): 111237591529=333523^2
1642555999999 => LS(p): 111614123569=334087^2
1866641333911 => LS(p): 1118361411331921=33441911^2
2220000001111 => LS(p): 326041=571^2
3377766664799 => LS(p): 233746141729=483473^2
3395445421111 => LS(p): 2319152415141241=48157579^2
3699999999511 => LS(p): 1316891521=36289^2
4314499117199 => LS(p): 141311242921171129=375913877^2
4337748888199 => LS(p): 14232714481129=3772627^2
4444888883399 => LS(p): 44582329=6677^2
4445555999999 => LS(p): 344569=587^2
4460666443199 => LS(p): 2416103624131129=49153877^2
4476666773399 => LS(p): 241746272329=491677^2
4917555555511 => LS(p): 141911177521=376711^2
4995008331199 => LS(p): 1429152018232129=37804127^2
5033377999999 => LS(p): 1510332769=38863^2
5555555999999 => LS(p): 7569=87^2
6555815554199 => LS(p): 1635181135141129=40437373^2
6662200755799 => LS(p): 36222017251729=6018473^2
6795564862799 => LS(p): 1617192516141816121729=40214332223^2
7700555669999 => LS(p): 2720352649=52157^2
7711776893911 => LS(p): 272127161819131921=521658089^2
8221554461111 => LS(p): 18221125241641=4268621^2
8222211221111 => LS(p): 1842212241=42921^2
8833334443399 => LS(p): 2843342329=53323^2
8844622951799 => LS(p): 282416221915111729=531428473^2
9200877111199 => LS(p): 19122018274129=4372873^2
9666444222511 => LS(p): 193634321521=440039^2
9951163333399 => LS(p): 291521165329=539927^2
9999811999999 => LS(p): 49182169=7013^2
10022226555599 => LS(p): 112042164529=334727^2
..
220088888881112222211111188444666699999999111111 => LS(p): 2220783152612834468961=47125185969^2
220088888881555555222222999999777222222277999999 => LS(p): 2220781165626937722769=47125164887^2
220088888884444445555333335559999000000000669999 => LS(p): 2220786445533549902649=47125220907^2
220088888885555555544444447755558884444444409999 => LS(p): 2220788574274538841049=47125243493^2
220088888885555555544444477774488888888003333311 => LS(p): 2220788564472488205321=47125243389^2
220088888887777222299999999988855555555588669999 => LS(p): 2220784742993895282649=47125202843^2
220088888887777777775522222222111111188815555511 => LS(p): 2220789725827138115521=47125255711^2
220088888888000000000999444444888333555222221111 => LS(p): 2220889039643833355241=47126309421^2
220088888888115555555111144444444424466666669999 => LS(p): 2220882175419412247649=47126236593^2
..
44444444777777777999999999111111114444444499999999888888800000000077777777744444444499999999 => LS(p): 8497998184897890979489=92184587567^2
44444444888888886666666663333333222222222777777777888888888666666665555555544444444499999999 => LS(p): 8488967392979886859489=92135592433^2
66666664444444411111111555555558888888884444444447777777772222222221111111166666666699999999 => LS(p): 7684818598949792819689=87663097133^2
66666666000000033333331111111114444444440000000099999999933333333322222222266666666611111111 => LS(p): 8670739194809993929681=93116804041^2
66666666555555555999999995555555000000000444444444666666661111111117777777770000000099999999 => LS(p): 8695897590948691978089=93251796717^2
77777777700000000444444444888888888666666333333337777777775555555554444444488888888811111111 => LS(p): 9780949866839795849881=98898684859^2
88888888777777777666666669999999998888888833333333355555555599999994444444448888888811111111 => LS(p): 8897869988939579948881=94328521609^2
555555555111111111333333300000000099999999966666666555555558888888899999999922222222211111111 => LS(p): 9591739099868588999281=97937424409^2
888888888000000000111111777777777555555555777777777666666666333333333444444440000000011111111 => LS(p): 9890619795979693848081=99451595241^2
7777777773333333339999999995555555522222222233333333377777777788888888000000000666666611111111 => LS(p): 9793998592939788907681=98964633041^2

Q2
Found nothing.

Q3
Found nothing.


Additional funny findings:
2 => LS(p): 120409=347^2
2 => LS(p): 9050906006600205091204=95136249698^2

144=12^2 => LS(n^2): 101124=318^2
576=24^2 => LS(n^2): 1509011716=38846^2
1000000000000=1000000^2 => LS(n^2): 1190043009=34497^2
1111111111111155555555555556=33333333333334^2 => LS(n^2): 61078195084516=7815254^2
10000000000000000000000000000000000=100000000000000000^2 => LS(n^2): 11209090608004=3347998^2

4=2^2 => LS(p^2): 301401=549^2
9=3^2 => LS(p^2): 1905060609=43647^2
2209=47^2 => LS(p^2): 30032022101904=5480148^2

***

Emmanuel wrote:

Q1.
The sequence continues :
110999711 -> 2110391721 = 45939\.b2
430003711 -> 141330131721 = 375939^2
444555311 -> 34351321 = 5861^2
611177311 -> 1631271321 = 40389^2
944692799 -> 19241619121729 = 4386527^2
957999199 -> 191517391129 = 437627^2
2244865199 -> 22241816151129 = 4716123^2
3211111199 -> 13126129 = 3623^2
3991889999 -> 1329112849 = 36457^2
4499977711 -> 24393721 = 4939^2
5253773311 -> 15121513272321 = 3888639^2
6110161111 -> 162110111641 = 402629^2
7644449999 -> 17164449 = 4143^2
9144422711 -> 191134221721 = 437189^2
17777554511 -> 114725141521 = 338711^2
32555539799 -> 13124513191729 = 3622777^2
39991555711 -> 133911351721 = 365939^2
42222277711 -> 14523721 = 3811^2
43328809999 -> 142312281049 = 377243^2
43335449999 -> 1433152449 = 37857^2
44449334599 -> 441923141529 = 664773^2
44773333399 -> 24275329 = 4927^2
47774499911 -> 1437243921 = 37911^2
53366881111 -> 1523262841 = 39029^2
55114555511 -> 2521144521 = 50211^2
55559992199 -> 4539121129 = 67373^2
56666401111 -> 1546141041 = 39321^2
61177777799 -> 16216729 = 4027^2
62914441111 -> 161219113441 = 401521^2
65551117711 -> 1635312721 = 40439^2
68777441111 -> 1618372441 = 40229^2
74455719911 -> 17242517112921 = 4152411^2
77721541111 -> 371211151441 = 609271^2
88853333399 -> 38155329 = 6177^2

Q2.
I found  two squares whose LS-image is square :
  x = 4*10^40 = (2*10^20)^2 ; LS(x) = 14400 = 120^2
  y = 9-10^360 = (3*10^180  )^2 ; LS(y) = 193600 = 440^2
I do not know if there exists a smaller solution than x.
And I presume that there are probably bigger solutions than  y  and solutions between  x  and  y.
But they may be hard to find ! 
.
Q3
Clearly, 2  is not a solution.
If  p  is an odd prime, then the two end digits of  p^2  are  a,b  with a ><= and  b  odd,  != a.
Hence, LS(p^2)  always will end with  1,b  which is never the end of a square. 
 
Thus, there are no primes whose square has a square LS-image.

 

***

 

Records   |  Conjectures  |  Problems  |  Puzzles