Octave, 9727 x 153442 = 1484111934
'01234'(perms(1:5)'(4:445))
So, it turns out, naively generating all the permutations and then truncating to the shortest substring that is still a valid superpermutation is shorter than generating the shortest superpermutation. Sadly, this time the score is not a palindrome.
Octave, 97 x 153 = 14841
a=sym(9);while i<120
i=0;a+=1;q='01234';for t=q(perms(1:5))'
i+=any(regexp(char(a),t'));end
end
a
Entry updated for a few things
a++
is not implemented for symbolic numbers.contains()
is not implemented in Octave. Replaced withany(regexp())
.- In the online link, I manually entered an
a
very close to the 153-length superpermutation. This allows for the solution to be verified.