conjectured_search.pl 890 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/perl
  2. # Composite numbers for which the harmonic mean of proper divisors is an integer.
  3. # https://oeis.org/A247077
  4. # Known terms:
  5. # 1645, 88473, 63626653506
  6. # These are numbers n such that sigma(n)-1 divides n*(tau(n)-1).
  7. # Conjecture: all terms are of the form n*(sigma(n)-1) where sigma(n)-1 is prime. - Chai Wah Wu, Dec 15 2020
  8. # If the above conjecture is true, then a(4) > 10^14.
  9. # This program assumes that the above conjecture is true.
  10. use 5.014;
  11. use strict;
  12. #use integer;
  13. use ntheory qw(:all);
  14. my $count = 0;
  15. foreach my $k (2 .. 1e9) {
  16. my $p = divisor_sum($k) - 1;
  17. is_prime($p) || next;
  18. next if ($k == $p);
  19. my $m = mulint($k, $p);
  20. if (++$count >= 1e5) {
  21. say "Testing: $k -> $m";
  22. $count = 0;
  23. }
  24. if (modint(mulint($m, divisor_sum($m, 0) - 1), divisor_sum($m) - 1) == 0) {
  25. say "\tFound: $k -> $m";
  26. }
  27. }