Prime Substrings by mitchs

#!ruby -nrmathn
a||=Prime.new.take$$
puts (1..s= ~/
|$/).map{|l|(0..s-l).map{|i|a.count$_[i,l].to_i}}*''

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page