Composite numbers k with no single digit factors whose factors are all substrings of k: Difference between revisions

Content added Content deleted
Line 1,333: Line 1,333:
def iter(n: Int, start: Int): Boolean = {
def iter(n: Int, start: Int): Boolean = {
val limit = math.sqrt(n).floor.toInt
val limit = math.sqrt(n).floor.toInt
(start to limit).dropWhile(n % _ > 0).headOption match {
(start to limit by 2).dropWhile(n % _ > 0).headOption match {
case Some(v) if v < 10 => false
case Some(v) if v < 10 => false
case Some(v) =>
case Some(v) =>
Line 1,359: Line 1,359:
15317 59177 83731 119911 183347 192413 1819231 2111317 2237411 3129361
15317 59177 83731 119911 183347 192413 1819231 2111317 2237411 3129361
5526173 11610313 13436683 13731373 13737841 13831103 15813251 17692313 19173071 28118827
5526173 11610313 13436683 13731373 13737841 13831103 15813251 17692313 19173071 28118827
time elapsed: 114828 ms
time elapsed: 59821 ms
</pre>
</pre>