Skip to main content
deleted 66 characters in body
Source Link

Jelly, 1010 9 bytes

2e²Æṣ€$¬Ɗ#2²Æṣ€ḟƑƊ#

Try it online!Try it online!

Times out on TIO for \$n > 5\$\$n > 3\$, but works in theory for all \$n\$. Relies on the assumption that for a given \$x \ge 2\$, \$x\$ is untouchable if none of the proper divisor sums between \$1\$ and \$x^2\$ equals \$x\$. Takes \$n\$ on STDIN.

How it works

2e²Æṣ€$¬Ɗ#2²Æṣ€ḟƑƊ# - Main link. Takes no arguments
        Ɗ  - Group the previous 3 links together into a monad f(k):
      $    -   Group the previous 2 links together into a monad g(k):
  ²        -       €     -     Over each 1, 2, ..., k²:
   Æṣ      -       Proper divisor sum
 e      Ƒ   -   Is kthe inlist theof proper divisor sums?
 unchanged after:
     ¬   -   Logical NOT; 0 -> 1,removing 1k ->from 0it?
2        # - Count up k = 2, 3, ... until n such k's return true under f(k)

Jelly, 10 bytes

2e²Æṣ€$¬Ɗ#

Try it online!

Times out on TIO for \$n > 5\$, but works in theory for all \$n\$. Relies on the assumption that for a given \$x \ge 2\$, \$x\$ is untouchable if none of the proper divisor sums between \$1\$ and \$x^2\$ equals \$x\$. Takes \$n\$ on STDIN.

How it works

2e²Æṣ€$¬Ɗ# - Main link. Takes no arguments
        Ɗ  - Group the previous 3 links together into a monad f(k):
      $    -   Group the previous 2 links together into a monad g(k):
  ²        -       €     -     Over each 1, 2, ..., k²:
   Æṣ      -       Proper divisor sum
 e         -   Is k in the proper divisor sums?
       ¬   -   Logical NOT; 0 -> 1, 1 -> 0
2        # - Count up k = 2, 3, ... until n such k's return true under f(k)

Jelly, 10 9 bytes

2²Æṣ€ḟƑƊ#

Try it online!

Times out on TIO for \$n > 3\$, but works in theory for all \$n\$. Relies on the assumption that for a given \$x \ge 2\$, \$x\$ is untouchable if none of the proper divisor sums between \$1\$ and \$x^2\$ equals \$x\$. Takes \$n\$ on STDIN.

How it works

2²Æṣ€ḟƑƊ# - Main link. Takes no arguments
       Ɗ  - Group the previous 3 links together into a monad f(k):
 ²        -   k²
    €     -   Over each 1, 2, ..., k²:
  Æṣ      -     Proper divisor sum
      Ƒ   -   Is the list of proper divisor sums unchanged after:
        -     removing k from it?
2       # - Count up k = 2, 3, ... until n such k's return true under f(k)
Source Link

Jelly, 10 bytes

2e²Æṣ€$¬Ɗ#

Try it online!

Times out on TIO for \$n > 5\$, but works in theory for all \$n\$. Relies on the assumption that for a given \$x \ge 2\$, \$x\$ is untouchable if none of the proper divisor sums between \$1\$ and \$x^2\$ equals \$x\$. Takes \$n\$ on STDIN.

How it works

2e²Æṣ€$¬Ɗ# - Main link. Takes no arguments
        Ɗ  - Group the previous 3 links together into a monad f(k):
      $    -   Group the previous 2 links together into a monad g(k):
  ²        -     k²
     €     -     Over each 1, 2, ..., k²:
   Æṣ      -       Proper divisor sum
 e         -   Is k in the proper divisor sums?
       ¬   -   Logical NOT; 0 -> 1, 1 -> 0
2        # - Count up k = 2, 3, ... until n such k's return true under f(k)