I took your ideas for avoiding retesting things and revamped my sieve. This generates all the answers that don't require factorial on anything higher than whatever you set (350 gets me all solutions for 1..30). It runs in about 5 seconds on my 1 GHz PC with that setting.
use strict;
use warnings;
use bigint;
# How high a number are you willing to factorialize?
my $factorial_limit = 999;
# Precache them to save on calls
my @factorials = do { my $last_fact = 1; (0, 1, map { $last_fact *= $_
+ } 2..$factorial_limit) };
# What's the biggest number you want to print?
my $print_up_to = 200;
# Each element of @formulas is an an opstring:
# a string of Fs and Ss, indicating factorial
# and square root, in order applied to get the
# index
my %formulas = (3 => '3');
my @unapplied = ([3, '3']);
while (@unapplied) {
my ($v, $ops) = @{shift(@unapplied)};
# Apply factorial
if ($v <= $factorial_limit) {
my $fv = $factorials[$v];
my $fops = $ops . 'F';
if (not exists $formulas{$fv}) {
push @unapplied, [$fv, $fops];
$formulas{$fv} = $fops;
}
}
# Apply sqrt
$v = int(sqrt($v));
$ops .= 'S';
if (not exists $formulas{$v}) {
push @unapplied, [$v, $ops];
$formulas{$v} = $ops;
}
}
for (sort { $a <=> $b } keys %formulas) {
last if $_ > $print_up_to;
print "$_: $formulas{$_}\n";
}
Update: pregenerated factorials to save time; also put in a limit on how high to print, so the huge numbers don't show up. Even taking factorials as high as 999 (takes 3040 seconds), there's no solution for 38.
Caution: Contents may have been coded under pressure.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
 a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)

For: 

Use: 
 &   & 
 <   < 
 >   > 
 [   [ 
 ]   ] 
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.

