Curious indeed.

This little function has a look at 4 and other left arguments to ^ :

seek =: 3 : 0
4 seek y
:
max    =. x
i      =. >: i. y
rep    =. 10 #.inv i
w      =. {:$ rep          NB. width of rep
nl0    =. <:w - 10 <.@^. i NB. number of leading zeros
out    =. 0 0 $ 0
for_x. >:i.max do.
   digtox =. x <.@^ i.10
   sumpow =. nl0 -~ +/"1 rep{ digtox
   out    =. out, x,  i#~ i = sumpow
end.
)

with this result,  sticking to y = 1e7

   10 seek 10000000
 1       1      0
 2       0      0
 3      12      0
 4    4624 595968
 5 3909511      0
 6       0      0
 7       0      0
 8    1033      0
 9      10      0
10       0      0

So there are a few other solutions in this range,  but only 4 affords two,
while 3 and 9 have small solutions.
===========================================================
BTW - Roger's reply looks to me as if his email s/w messed up Raul's post -
or perhaps it's just Thunderbird on my machine.  Roger's copy appears on
this laptop,  using brackets to force matters,
   +/ (4 ^ 10) #. inv 595968

Perhaps it might be repaired by embedding a space,  to read
   +/4 ^10#.inv 595968
or adding these brackets
   +/4 ^ (10#.inv 595968)

Cheers,

Mike

On 07/02/2021 16:20, Julian Fondren wrote:
On 2021-02-07 10:13, Raul Miller wrote:
+/4^10#.inv 595968
595968

Any others like this out there?

Thanks,

under 1e7, just 4624
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to