Special divisors

use Prime::Factor:ver<0.3.0+>;

say "{+$_} matching numbers:\n{.batch(10)».fmt('%3d').join: "\n"}"
    given (1..^200).grep: { all .flip «%%« .&divisors».flip };

Output:

72 matching numbers:
  1   2   3   4   5   6   7   8   9  11
 13  17  19  22  23  26  27  29  31  33
 37  39  41  43  44  46  47  53  55  59
 61  62  66  67  69  71  73  77  79  82
 83  86  88  89  93  97  99 101 103 107
109 113 121 127 131 137 139 143 149 151
157 163 167 169 173 179 181 187 191 193
197 199

Last updated