prog.sf 1.0 KB

12345678910111213141516171819
  1. #!/usr/bin/ruby
  2. # Poulet numbers with a record number of divisors that are also Poulet numbers
  3. # https://oeis.org/A300327
  4. # New terms:
  5. # 341, 13981, 126217, 294409, 2113665, 4670029, 127479097, 140996401, 509033161, 8600780461, 42625846021, 220411358713, 2382784226641, 11361630988981, 56308742593741, 431283945022021, 434124350060401, 2056455209005561, 5598600634063801, 8178192276975721, 30687765301237681, 78576507360932581, 589876107753613681, 3233304308475201961, 5554485519524020261
  6. # Data terms:
  7. # 341, 13981, 126217, 294409, 2113665, 4670029, 127479097, 140996401, 509033161, 8600780461, 42625846021, 220411358713, 2382784226641, 11361630988981, 56308742593741, 431283945022021, 434124350060401, 2056455209005561, 5598600634063801, 8178192276975721
  8. #`(
  9. # Command used to generate the terms:
  10. zstdcat psps-below-2-to-64.txt.zst | perl -Mntheory=:all -E 'my $max = 0; while(<>) { chomp; my $count = grep { is_pseudoprime($_) && !is_prime($_) } divisors($_); if ($count > $max) { say $_; $max = $count } }'
  11. )